判断字段是否为空 fileUrl(e){ let p=!this.isEmpty(e)&&String(e).replace(/^[\s]+|[\s]+$/g,'')!='[]'; if(p){ return JSON.parse(e) }else{ return false } }, isEmpty(str) { return (null == str || undefined == str || [] == str || "" == this._trim(str)); }, _trim(szExp) { if (szExp == null) return null; szExp = szExp.toString(); if ((szExp.charAt(0) != ' ') && (szExp.charAt(szExp.length - 1) != ' ')) { return szExp; } while (szExp.charAt(0) == ' ') { szExp = '' + szExp.substring(1, szExp.length); } while (szExp.charAt(szExp.length - 1) == ' ') { szExp = '' + szExp.substring(0, szExp.length - 1); } // szExp = String(szExp).replace(/^[\s]+|[\s]+$/g,''); return szExp; }, ```