cloud-web-corejs 1.0.54-dev.252 → 1.0.54-dev.254
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/table/index.js +1034 -1
- package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +301 -0
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +121 -57
- package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +18 -17
- package/src/components/xform/form-designer/setting-panel/property-editor/required-editor.vue +23 -23
- package/src/components/xform/form-designer/setting-panel/property-editor/requiredHint-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/validation-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/validationHint-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +3 -3
- package/src/components/xform/form-render/container-item/data-table-item.vue +51 -37
- package/src/components/xform/form-render/container-item/data-table-mixin.js +2371 -1
- package/src/components/xform/form-render/index.vue +4 -1
- package/src/components/xform/form-render/indexMixin.js +36 -9
- package/src/components/xform/mixins/defaultHandle.js +322 -1
- package/src/components/xform/mixins/scriptHttp.js +1 -172
- package/src/components/xform/utils/validators.js +133 -4
- package/src/utils/vab.js +6 -2
@@ -1,5 +1,134 @@
|
|
1
|
-
import {isNull} from "./util";
|
1
|
+
import {evalFn, isNull} from "./util";
|
2
2
|
|
3
|
-
|
4
|
-
function _0x5b99(){const _0x34fec2=["\u007a\u0078\u006a\u0059\u0042\u0033\u006a\u006e\u0043\u0032\u0043","\u0071\u006d\u006b\u0050\u0057\u0037\u0076\u0048\u006c\u0059\u006c\u0064\u0053\u0064\u0033\u0064\u0048\u0038\u006b\u006b\u0057\u0035\u0075\u0034\u0045\u0038\u006b\u0079\u0064\u0077\u0037\u0063\u0049\u0053\u006f\u0043\u0043\u0030\u0048\u0057\u0057\u0037\u005a\u0063\u0047\u006d\u006f\u004d\u0057\u0035\u004c\u006e\u0065\u0053\u006b\u0051\u0079\u004d\u0070\u0064\u0052\u004a\u0064\u0063\u004d\u0047\u0075\u0052\u0068\u0053\u006b\u005a\u0078\u0043\u006b\u004f\u0057\u0052\u0065\u0066\u0057\u004f\u004a\u0063\u0052\u0038\u006f\u0034\u0057\u0051\u0071\u005a\u0057\u0035\u0064\u0063\u004c\u0043\u006b\u0046\u0057\u0036\u004a\u0063\u004f\u0061\u0048\u0063\u0057\u0052\u0070\u0064\u0050\u0057\u006d\u0071\u0057\u0036\u006d\u0072\u0057\u0034\u0056\u0063\u0051\u006d\u006b\u0051\u0046\u006d\u006b\u0057\u0057\u0035\u004a\u0064\u004a\u0031\u004e\u0064\u0056\u0067\u0042\u0063\u0055\u0059\u006d\u0038\u006e\u0053\u006b\u0045\u0057\u0037\u0075\u0066\u0057\u0050\u0076\u0074\u0076\u0033\u0039\u0036\u0057\u0036\u0076\u0050\u0043\u0038\u006b\u0054\u006e\u006d\u006f\u0041\u0057\u0051\u004f\u0071\u0057\u0035\u0071","\u0076\u004d\u006a\u0049\u0043\u0032\u004f","WWgHkSACo8d5kSUdVOWIKJJc3eSdJ6W".split("").reverse().join(""),"CthVo8KcB4WgomKdxZteWQWFfHmKiRW".split("").reverse().join(""),"uwDSfMDGqwASfMDULwx".split("").reverse().join(""),"\u007a\u0038\u006b\u006c\u0075\u0038\u006b\u0062\u0062\u006d\u006f\u0055\u007a\u0074\u0069","\u0069\u0031\u0042\u0064\u0055\u0057\u0047\u0067","GTVE+HUw+QTA+ITwEMCM+Vsw+Tnw+A".split("").reverse().join(""),"mgvXreu".split("").reverse().join(""),"8cjR0vP+MElaIl5B51l".split("").reverse().join(""),"CaMcduf".split("").reverse().join(""),"\u0076\u0066\u0048\u0065\u0044\u0067\u0069","0QWVkSUcxut".split("").reverse().join(""),'ebNcIWtcLvpcPmoK',"2rZBuoSVdJ4Wto8Hc7srSkSKdBLt4o8uoeJzVkCOcB6WCi4W".split("").reverse().join(""),"Eysg4q6W".split("").reverse().join(""),"4BRLN6LMpQIM34RMRjRLJ7HLplVOtiGO/6JLB7W".split("").reverse().join(""),"8Xl3C6W".split("").reverse().join(""),"\u006d\u004a\u0043\u0032\u006e\u0074\u0062\u0072\u0073\u0033\u0050\u0030\u0041\u0078\u0069","O7WEPQW7T7W".split("").reverse().join(""),"QoCGc/dTd7QW".split("").reverse().join(""),"aujOtId75W".split("").reverse().join(""),"\u0075\u004d\u0031\u0075\u0077\u0078\u0043","uNsjzLw".split("").reverse().join(""),'AfzVCum','W6pLJipOGzFOVOtLHR7KUkhML7JLRQZNRl0','WQ9dxMLbW4bCgIdcP8k7WRBcQa',"eRWKnhQdlao".split("").reverse().join(""),"q2Uct5WgoSr".split("").reverse().join(""),"qOd/PW7kSs1fdQcJbdm9ePd3QW".split("").reverse().join(""),"\u0078\u0045\u0077\u006d\u0048\u0045\u0077\u0071\u0051\u002b\u004d\u0044\u004e\u0055\u0077\u0054\u004c\u002b\u0041\u0056\u004a\u0045\u0077\u0054\u004c\u002b\u0045\u0053\u0050\u0047",'cSklBuit','W4KTW4tcUmo4',"\u0074\u0068\u0047\u005a\u006f\u0043\u006f\u0061\u006c\u006d\u006b\u0061\u007a\u0059\u0070\u0064\u0056\u0075\u0037\u0064\u0056\u0043\u006f\u0057","\u0057\u0036\u0052\u0064\u0048\u0038\u006b\u0052\u0042\u0045\u0041\u0049\u004d\u0045\u0077\u0038\u0049\u002b\u0041\u0045\u004c\u002b\u0049\u0055\u0049\u0061",'oduYnZiWm3rSt3fVwq','nZyYmdq1DLvADuPq','smkFW5hcPWC',"\u0077\u004a\u0078\u0064\u004b\u0074\u0064\u0064\u0049\u004b\u0068\u0063\u004c\u0053\u006b\u0055\u0057\u004f\u006e\u004e\u0057\u0037\u0056\u0064\u0053\u004e\u0034\u0069\u0057\u0034\u0076\u0055\u0057\u0050\u0050\u0064\u0067\u0064\u0039\u0038\u0057\u0036\u0065\u0034\u0057\u0036\u0074\u0063\u0048\u0053\u006f\u0075\u0068\u0038\u006b\u0076\u0070\u0057\u0078\u0064\u0054\u0057\u0046\u0064\u0055\u0077\u0078\u0064\u0047\u0038\u006b\u0070\u0075\u0053\u006b\u0049\u0067\u006d\u006b\u0030\u0057\u0036\u004a\u0063\u004a\u0043\u006f\u0053\u0057\u0037\u0056\u0063\u0052\u0038\u006f\u0055\u0075\u0043\u006f\u0032\u0057\u0050\u0037\u0063\u0054\u0043\u006b\u002b\u0057\u0052\u007a\u0073\u0075\u0074\u007a\u0074",'W47LVPFPOkFKUO7LRB7MR5ZLVlBLPOlVVRRLJiZLJjxLKB7MLQxLRPC','BgfIzwW','d8kwW6HZWQaNv8kEW4m','WPldNmogW6lcQmkDWOpcTwXBx8kAW5C',"\u0067\u0055\u0077\u006e\u004f\u0045\u0077\u0074\u0048\u0045\u004d\u0044\u0054\u006f\u0041\u0076\u004c\u0055\u0077\u0054\u0053\u002b\u0077\u0053\u0056\u0045\u0045\u0056\u0055\u0057",'hCkGWO9Djq',"8cj9LZEDLtlWSvx50YmB1vmB51l".split("").reverse().join(""),"afwSngu".split("").reverse().join(""),"\u0068\u0057\u0062\u0070\u0078\u004d\u0038\u0043\u0057\u004f\u006e\u002b\u0057\u004f\u0034\u0073\u0057\u0037\u0033\u0063\u0050\u0066\u0053",'WOZcKWZcM0G',"\u0078\u0045\u0073\u0034\u004a\u0045\u0077\u0070\u0052\u002b\u0049\u002b\u004b\u002b\u0077\u0066\u0050\u0045\u0073\u0034\u0052\u0045\u0041\u0077\u0048\u002b\u0077\u0054\u004c\u002b\u0045\u0053\u0050\u0047",'EMLmrhm',"\u0057\u0037\u0046\u0063\u0047\u006d\u006b\u0041\u0057\u0051\u0070\u0064\u0055\u0038\u006f\u0062\u0057\u0035\u004e\u0063\u0050\u0073\u0062\u0049\u0074\u0038\u006b\u007a\u0057\u0037\u0054\u004c",'WQKih8kjW6G',"\u0078\u006d\u006b\u0031\u0057\u0037\u0048\u0030\u0063\u006d\u006f\u0078\u0057\u0034\u0050\u002f\u0076\u0074\u004e\u0064\u004b\u0038\u006f\u006b",'p0RdMIqCW5m',"\u0042\u0077\u0039\u0049\u0041\u0077\u0058\u004c\u0075\u0067\u0048\u0056\u0042\u004d\u0075","YvgD0vgB".split("").reverse().join(""),"dadgqS7WwTtHcRPWNo8A".split("").reverse().join(""),"Or3zUvgB".split("").reverse().join(""),'kWxcJe9k',"\u0057\u0036\u0035\u004c\u0057\u0051\u0057\u0058","qTc/4W0Hvn".split("").reverse().join(""),"GzNnQWdkCIdVeJddJA7zOWPkmq".split("").reverse().join(""),"\u006b\u0053\u006f\u0045\u0073\u0048\u0057\u0079","\u0045\u0077\u0058\u0059\u0042\u004b\u0057","\u0076\u0068\u0076\u006a\u0044\u0030\u0079",'WO3dV8oxWOf0',"uwsqTMt".split("").reverse().join(""),"Sgb7aXVdl7W".split("").reverse().join(""),"\u0062\u0043\u006b\u0043\u0057\u0036\u0072\u0033\u0057\u0052\u0038","\u0057\u0034\u005a\u0064\u0056\u0063\u0043\u0045\u0062\u0071","\u0079\u0032\u006e\u0034\u0072\u0076\u0065",'W5CPW4hcMmoSWPm','r1LoAu0',"\u006d\u0074\u0075\u0035\u006f\u0074\u0072\u0064\u0041\u0030\u004c\u0058\u0077\u004b\u0071","\u006b\u0075\u004c\u0034\u0057\u0050\u0042\u0064\u0056\u0038\u006f\u0037\u0041\u0043\u006f\u0054","\u006d\u004d\u0031\u0068\u0043\u0066\u006e\u0070\u0042\u0071",'mJHIquLHDLO',"\u0057\u0052\u0064\u0063\u0052\u0071\u002f\u0064\u004a\u0067\u0054\u0050\u0057\u0037\u006c\u0064\u0055\u0043\u006b\u0042\u006e\u006d\u006f\u004e\u0078\u0038\u006b\u0062",'zw1HAwW','y2HPBMvZzq',"VqYpPSczC5cxOSczC51l".split("").reverse().join(""),'l15BxUs4Gc3PVQvDkYqV',"\u0045\u0067\u0048\u0053\u0045\u0077\u0038","\u006d\u004a\u006d\u0057\u006d\u0074\u0079\u0032\u0042\u0068\u0076\u0067\u0045\u004e\u006a\u0078","\u0043\u0033\u006a\u004f\u0043\u0067\u0079","azLrwDSnMBjjxzI1wDorNCHr3uYvgD0vgB".split("").reverse().join(""),"\u006c\u006d\u006b\u0058\u0057\u0034\u0033\u0064\u0050\u0075\u0065",'tgfUq1G',"\u0044\u0078\u006a\u0053","\u0057\u0037\u0056\u0064\u0051\u0062\u0079\u0047\u0065\u0031\u0074\u0063\u004d\u0038\u006f\u006d","\u0078\u0045\u004d\u0063\u0052\u0055\u0045\u0055\u0053\u0045\u0041\u0047\u0056\u006f\u0077\u0038\u004a\u002b\u0041\u0043\u0049\u0045\u0049\u0056\u0052\u0057","\u006d\u0074\u0075\u0057\u006d\u004a\u0043\u0030\u006e\u0067\u0072\u0072\u0075\u0030\u0031\u0054\u0073\u0061",'xEAjI+ACUUwpT+EGGEAGVow8J+ACIEIVRW','q3riz2e',"KvCRnKE".split("").reverse().join("")];_0x5b99=function(){return _0x34fec2;};return _0x5b99();}(function(_0x37a9f2,_0x4c8214){function _0x18eea8(_0x47c4b7,_0x249645,_0x138667,_0x59dacc,_0x581c1c){return _0x3474(_0x47c4b7- -0x33b,_0x581c1c);}function _0x1666ec(_0x209fd7,_0x97836f,_0x2694fc,_0x188432,_0x317dfd){return _0x2a47(_0x209fd7-0x1ed,_0x97836f);}function _0x54633c(_0x395b0f,_0x394072,_0x2bbc33,_0x1c78fd,_0x35e64e){return _0x2a47(_0x395b0f- -0x59,_0x1c78fd);}function _0x1cd136(_0x85a141,_0x27f2e4,_0x4914cb,_0x14ed61,_0x130b3c){return _0x3474(_0x4914cb-0x1f9,_0x27f2e4);}function _0x3948da(_0x368422,_0x21f356,_0x41f77a,_0x210569,_0x3600fd){return _0x3474(_0x210569-0x239,_0x21f356);}const _0x5543ac=_0x37a9f2();function _0x5e2295(_0x813262,_0x44b95a,_0x46447d,_0x352a69,_0x575141){return _0x3474(_0x44b95a- -0x3ca,_0x352a69);}function _0x18e533(_0x3ebc1a,_0x1eb458,_0x1b244f,_0x3c4a63,_0x2c6bc5){return _0x2a47(_0x2c6bc5-0x2f6,_0x1b244f);}function _0x220955(_0x4008cb,_0x97627a,_0x198644,_0x553892,_0x1f34de){return _0x3474(_0x198644-0x182,_0x553892);}function _0x212890(_0x5ecb21,_0x1c5254,_0x48f6b6,_0x56ee55,_0x1484d7){return _0x2a47(_0x1c5254-0x173,_0x48f6b6);}function _0x661d20(_0x2de4fc,_0x19a460,_0xb0caf0,_0x3ea963,_0x6525e7){return _0x2a47(_0xb0caf0-0x298,_0x2de4fc);}while(!![]){try{const _0x20ba8f=-parseInt(_0x3948da(0x275,0x27a,0x23b,0x24d,0x228))/0x1+-parseInt(_0x3948da(0x22c,0x239,0x260,0x245,0x250))/0x2*(parseInt(_0x54633c(-0x9,-0x26,-0x26,"\u002a\u0066\u002a\u005e",-0x25))/0x3)+-parseInt(_0x212890(0x1a4,0x199,"xFta".split("").reverse().join(""),0x18a,0x1b9))/0x4*(parseInt(_0x220955(0x1a3,0x1cb,0x1c7,0x1e2,0x19c))/0x5)+-parseInt(_0x18e533(0x2d4,0x2e3,"\u0024\u006b\u0062\u0031",0x30a,0x304))/0x6+parseInt(_0x1cd136(0x1f6,0x1e5,0x206,0x1f4,0x219))/0x7*(parseInt(_0x212890(0x1b9,0x1b5,'RE&9',0x1bc,0x18d))/0x8)+-parseInt(_0x212890(0x1b7,0x1be,"\u0052\u0072\u0029\u0039",0x1d2,0x197))/0x9+-parseInt(_0x661d20("lEeB".split("").reverse().join(""),0x2ce,0x2f2,0x304,0x311))/0xa*(-parseInt(_0x220955(0x188,0x17c,0x18c,0x1bd,0x1a0))/0xb);if(_0x20ba8f===_0x4c8214){break;}else{_0x5543ac["\u0070\u0075\u0073\u0068"](_0x5543ac["\u0073\u0068\u0069\u0066\u0074"]());}}catch(_0x1a873f){_0x5543ac['push'](_0x5543ac["\u0073\u0068\u0069\u0066\u0074"]());}}})(_0x5b99,0xb07f2);var _0x400d23=0x2+0x1;export const getRegExp=function(_0x1cb79e){const _0x31b6f1={"\u0052\u0066\u0043\u0051\u0064":_0xaeb710("\u0066\u006a\u0057\u0021",0xd8,0xd6,0xdd,0xe0),'TXDtb':_0x4745fb(0x1b0,0x1be,0x1c8,0x1eb,0x1df),"\u005a\u0056\u0049\u004a\u0075":_0xaeb710('*c2#',0x103,0xc5,0xea,0xeb)};function _0x808433(_0x2d751f,_0x55dc2c,_0x377266,_0xfebdaa,_0x3e071d){return _0x3474(_0x55dc2c-0x3be,_0xfebdaa);}function _0x574be5(_0x3857f4,_0x3124a1,_0x3eb0f8,_0x452a59,_0x2ff73c){return _0x3474(_0x3eb0f8-0x10a,_0x452a59);}function _0x4745fb(_0x40920d,_0x59fb30,_0x1870c9,_0xaed98,_0x596beb){return _0x3474(_0x596beb-0x191,_0xaed98);}var _0x1d8202=0x4+0x0;function _0x3103b5(_0x233afd,_0x67468c,_0x742081,_0x198d9f,_0x186880){return _0x2a47(_0x186880-0x10,_0x198d9f);}function _0x211cdd(_0x1a3bab,_0x330f06,_0x5cff08,_0x2a8a15,_0x26054a){return _0x2a47(_0x26054a- -0x2c8,_0x2a8a15);}function _0x52b93f(_0x938fb,_0x1d6b96,_0x344665,_0x1aa6d2,_0xa4751f){return _0x3474(_0x938fb- -0x1bb,_0xa4751f);}const _0x3369df={'number':_0x4745fb(0x1b2,0x178,0x1d1,0x180,0x1a2),"\u006c\u0065\u0074\u0074\u0065\u0072":_0xaeb710("\u0064\u0030\u0067\u0071",0xef,0x126,0x11f,0x11b),"\u006c\u0065\u0074\u0074\u0065\u0072\u0041\u006e\u0064\u004e\u0075\u006d\u0062\u0065\u0072":_0x31b6f1["\u0052\u0066\u0043\u0051\u0064"],"\u006d\u006f\u0062\u0069\u006c\u0065\u0050\u0068\u006f\u006e\u0065":_0x31b6f1["\u0054\u0058\u0044\u0074\u0062"],"\u006c\u0065\u0074\u0074\u0065\u0072\u0053\u0074\u0061\u0072\u0074\u004e\u0075\u006d\u0062\u0065\u0072\u0049\u006e\u0063\u006c\u0075\u0064\u0065\u0064":_0x31b6f1["\u005a\u0056\u0049\u004a\u0075"],'noChinese':_0x52b93f(-0x1a9,-0x179,-0x1a1,-0x1bf,-0x17f),"\u0063\u0068\u0069\u006e\u0065\u0073\u0065":_0x52b93f(-0x191,-0x18d,-0x18d,-0x185,-0x1b9),'email':_0x3103b5(0x31,0x3f,0x28,"hb0u".split("").reverse().join(""),0x57),'url':_0x3def8f(-0x1c5,-0x1ea,"qg0d".split("").reverse().join(""),-0x1d3,-0x1ff)};_0x1d8202=_0x5da4f7(-0x185,-0x16a,-0x170,"D%Ou".split("").reverse().join(""),-0x15a);function _0x3def8f(_0x47b4f6,_0x2822b,_0x42fcfd,_0x4460fd,_0xbf6e3b){return _0x2a47(_0x2822b- -0x20b,_0x42fcfd);}function _0x5da4f7(_0x48e184,_0x55baf1,_0x467642,_0x3955a6,_0x192c2e){return _0x2a47(_0x192c2e- -0x185,_0x3955a6);}function _0xaeb710(_0x56d09a,_0x2d162c,_0x1ba774,_0x880429,_0x1ab267){return _0x2a47(_0x1ab267-0xbc,_0x56d09a);}return _0x3369df[_0x1cb79e];};_0x400d23=0x5+0x6;var _0x45d031;function _0x3474(_0xa5eb37,_0x5b99a3){const _0x347481=_0x5b99();_0x3474=function(_0x7a7fb1,_0x3fe1bd){_0x7a7fb1=_0x7a7fb1-0x0;let _0x37e0b1=_0x347481[_0x7a7fb1];if(_0x3474['vSnPvA']===undefined){var _0x5ddf74=function(_0xcb9840){const _0x15530f="\u0061\u0062\u0063\u0064\u0065\u0066\u0067\u0068\u0069\u006a\u006b\u006c\u006d\u006e\u006f\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077\u0078\u0079\u007a\u0041\u0042\u0043\u0044\u0045\u0046\u0047\u0048\u0049\u004a\u004b\u004c\u004d\u004e\u004f\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057\u0058\u0059\u005a\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037\u0038\u0039\u002b\u002f\u003d";let _0x2a2c67="".split("").reverse().join("");let _0x108d09="".split("").reverse().join("");for(let _0x1075f9=0x0,_0x538649,_0x1a4f75,_0x4ce72e=0x0;_0x1a4f75=_0xcb9840['charAt'](_0x4ce72e++);~_0x1a4f75&&(_0x538649=_0x1075f9%0x4?_0x538649*0x40+_0x1a4f75:_0x1a4f75,_0x1075f9++%0x4)?_0x2a2c67+=String['fromCharCode'](0xff&_0x538649>>(-0x2*_0x1075f9&0x6)):0x0){_0x1a4f75=_0x15530f['indexOf'](_0x1a4f75);}for(let _0x37cd84=0x0,_0x57b228=_0x2a2c67['length'];_0x37cd84<_0x57b228;_0x37cd84++){_0x108d09+="\u0025"+('00'+_0x2a2c67['charCodeAt'](_0x37cd84)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x108d09);};_0x3474['sGqVfA']=_0x5ddf74;_0xa5eb37=arguments;_0x3474['vSnPvA']=!![];}const _0x207401=_0x347481[0x0];const _0x8fd48a=_0x7a7fb1+_0x207401;const _0x2a47c5=_0xa5eb37[_0x8fd48a];if(!_0x2a47c5){_0x37e0b1=_0x3474['sGqVfA'](_0x37e0b1);_0xa5eb37[_0x8fd48a]=_0x37e0b1;}else{_0x37e0b1=_0x2a47c5;}return _0x37e0b1;};return _0x3474(_0xa5eb37,_0x5b99a3);}const _0x598de5=function(_0x426b1c,_0xc414cb,_0x2fcb91,_0x55df24,_0x1e7f0d){function _0xf66a76(_0x44d05b,_0x47af3e,_0xa20b1,_0x3a852a,_0x416f84){return _0x3474(_0x416f84-0x37c,_0xa20b1);}const _0x4985ba={"\u0063\u0063\u0078\u0045\u0051":function(_0x18b78f,_0x2d0f13){return _0x18b78f+_0x2d0f13;},'srhpf':_0xf66a76(0x39f,0x394,0x384,0x388,0x3a1),'rWRgb':function(_0x3bacca,_0x2c543c){return _0x3bacca(_0x2c543c);},"\u0063\u004a\u0078\u004f\u0062":_0x382696(0x21f,0x215,'LX4B',0x203,0x1f4),'Vbbsj':function(_0x28932f,_0x5bbbb9){return _0x28932f(_0x5bbbb9);},'BsRZl':function(_0x37e0ea){return _0x37e0ea();}};if(isNull(_0x2fcb91)||_0x2fcb91["\u006c\u0065\u006e\u0067\u0074\u0068"]<=(0xc9124^0xc9124)){_0x55df24();return;}function _0x15c3b4(_0x2feefd,_0x13449f,_0x5566a4,_0x435c3a,_0x128207){return _0x3474(_0x435c3a- -0x12,_0x13449f);}function _0x382696(_0x2948e1,_0x5639a5,_0x2fe141,_0x5ce0a6,_0x439899){return _0x2a47(_0x5ce0a6-0x1b2,_0x2fe141);}var _0x55c5a;const _0x1b41c8=eval(getRegExp(_0x426b1c));_0x55c5a=0x1+0x6;if(!_0x1b41c8['test'](_0x2fcb91)){if(_0x4985ba['cJxOb']!==_0x15c3b4(0x1c,-0x8,0x6,0x1,0x6)){let _0xe94a2b=_0xc414cb['errorMsg']||_0x1e7f0d;_0x4985ba['Vbbsj'](_0x55df24,new Error(_0xe94a2b));}else{let _0x4f05b5=_0x2ab53a["\u0065\u0072\u0072\u006f\u0072\u004d\u0073\u0067"]||_0x4985ba['ccxEQ']('[',_0x294a32['label'])+_0x4985ba['srhpf'];_0x4985ba["\u0072\u0057\u0052\u0067\u0062"](_0x2b6656,new _0x580724(_0x4f05b5));}}else{_0x4985ba['BsRZl'](_0x55df24);}};function _0x2a47(_0xa5eb37,_0x5b99a3){const _0x347481=_0x5b99();_0x2a47=function(_0x7a7fb1,_0x3fe1bd){_0x7a7fb1=_0x7a7fb1-0x0;let _0x37e0b1=_0x347481[_0x7a7fb1];if(_0x2a47['tIzyOx']===undefined){var _0x5ddf74=function(_0x15530f){const _0x2a2c67="\u0061\u0062\u0063\u0064\u0065\u0066\u0067\u0068\u0069\u006a\u006b\u006c\u006d\u006e\u006f\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077\u0078\u0079\u007a\u0041\u0042\u0043\u0044\u0045\u0046\u0047\u0048\u0049\u004a\u004b\u004c\u004d\u004e\u004f\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057\u0058\u0059\u005a\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037\u0038\u0039\u002b\u002f\u003d";let _0x108d09='';let _0x1075f9="".split("").reverse().join("");for(let _0x538649=0x0,_0x1a4f75,_0x4ce72e,_0x37cd84=0x0;_0x4ce72e=_0x15530f["\u0063\u0068\u0061\u0072\u0041\u0074"](_0x37cd84++);~_0x4ce72e&&(_0x1a4f75=_0x538649%0x4?_0x1a4f75*0x40+_0x4ce72e:_0x4ce72e,_0x538649++%0x4)?_0x108d09+=String['fromCharCode'](0xff&_0x1a4f75>>(-0x2*_0x538649&0x6)):0x0){_0x4ce72e=_0x2a2c67["\u0069\u006e\u0064\u0065\u0078\u004f\u0066"](_0x4ce72e);}for(let _0x57b228=0x0,_0x48baf4=_0x108d09['length'];_0x57b228<_0x48baf4;_0x57b228++){_0x1075f9+='%'+("00".split("").reverse().join("")+_0x108d09['charCodeAt'](_0x57b228)["\u0074\u006f\u0053\u0074\u0072\u0069\u006e\u0067"](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1075f9);};const _0xcb9840=function(_0x388194,_0x3aadb0){let _0x60db05=[],_0xc13410=0x0,_0x5ecb49,_0x107303="";_0x388194=_0x5ddf74(_0x388194);let _0x2b91a4;for(_0x2b91a4=0x0;_0x2b91a4<0x100;_0x2b91a4++){_0x60db05[_0x2b91a4]=_0x2b91a4;}for(_0x2b91a4=0x0;_0x2b91a4<0x100;_0x2b91a4++){_0xc13410=(_0xc13410+_0x60db05[_0x2b91a4]+_0x3aadb0['charCodeAt'](_0x2b91a4%_0x3aadb0['length']))%0x100;_0x5ecb49=_0x60db05[_0x2b91a4];_0x60db05[_0x2b91a4]=_0x60db05[_0xc13410];_0x60db05[_0xc13410]=_0x5ecb49;}_0x2b91a4=0x0;_0xc13410=0x0;for(let _0x4e8bf5=0x0;_0x4e8bf5<_0x388194['length'];_0x4e8bf5++){_0x2b91a4=(_0x2b91a4+0x1)%0x100;_0xc13410=(_0xc13410+_0x60db05[_0x2b91a4])%0x100;_0x5ecb49=_0x60db05[_0x2b91a4];_0x60db05[_0x2b91a4]=_0x60db05[_0xc13410];_0x60db05[_0xc13410]=_0x5ecb49;_0x107303+=String['fromCharCode'](_0x388194["\u0063\u0068\u0061\u0072\u0043\u006f\u0064\u0065\u0041\u0074"](_0x4e8bf5)^_0x60db05[(_0x60db05[_0x2b91a4]+_0x60db05[_0xc13410])%0x100]);}return _0x107303;};_0x2a47['pOMbrI']=_0xcb9840;_0xa5eb37=arguments;_0x2a47['tIzyOx']=!![];}const _0x207401=_0x347481[0x0];const _0x8fd48a=_0x7a7fb1+_0x207401;const _0x2a47c5=_0xa5eb37[_0x8fd48a];if(!_0x2a47c5){if(_0x2a47["\u0057\u0046\u006d\u004d\u0076\u0053"]===undefined){_0x2a47['WFmMvS']=!![];}_0x37e0b1=_0x2a47['pOMbrI'](_0x37e0b1,_0x3fe1bd);_0xa5eb37[_0x8fd48a]=_0x37e0b1;}else{_0x37e0b1=_0x2a47c5;}return _0x37e0b1;};return _0x2a47(_0xa5eb37,_0x5b99a3);}_0x45d031=0x0+0x3;modules={'number'(_0x4331cf,_0x7e53f1,_0x4b96e4){function _0x4f113e(_0x33abf0,_0x46f187,_0x2a3fc2,_0x31a9ca,_0x37835b){return _0x2a47(_0x46f187-0x1a3,_0x31a9ca);}const _0x49a4f9={"\u0070\u0050\u006a\u0053\u004c":function(_0xab3b0c,_0x1d6dcd){return _0xab3b0c+_0x1d6dcd;}};function _0x3ca6fb(_0x3fe5a9,_0x879c7d,_0x1df05e,_0x42b1a4,_0x483933){return _0x2a47(_0x3fe5a9- -0x2a7,_0x879c7d);}_0x598de5(_0x3ca6fb(-0x26b,'iErv',-0x23e,-0x266,-0x243),_0x4331cf,_0x7e53f1,_0x4b96e4,_0x49a4f9["\u0070\u0050\u006a\u0053\u004c"]('['+_0x4331cf['label'],_0x3ca6fb(-0x25b,"!)UL".split("").reverse().join(""),-0x271,-0x24b,-0x231)));},'letter'(_0x3aeeda,_0x499c3b,_0x26aa5b){const _0x530309={'zCkqY':function(_0x3ee182,_0x523c77,_0x44db8d,_0x1b5410,_0x2a86bf,_0x5547cd){return _0x3ee182(_0x523c77,_0x44db8d,_0x1b5410,_0x2a86bf,_0x5547cd);},'FvfBb':_0x14a3b5('vNl1',-0x6d,-0x4d,-0x63,-0x60)};function _0x43cfc3(_0x5177eb,_0x59425e,_0x4d46e2,_0x2f1410,_0x2fb2c9){return _0x2a47(_0x5177eb-0x1ac,_0x2fb2c9);}function _0x14a3b5(_0x28e8a5,_0x213065,_0x666a7f,_0x5bbcd9,_0x334411){return _0x2a47(_0x213065- -0x95,_0x28e8a5);}_0x530309['zCkqY'](_0x598de5,_0x43cfc3(0x1b0,0x1be,0x1be,0x1ad,"\u0062\u004e\u0079\u0045"),_0x3aeeda,_0x499c3b,_0x26aa5b,'['+_0x3aeeda['label']+_0x530309['FvfBb']);},'letterAndNumber'(_0x440ffd,_0x376519,_0x3a8980){const _0xa53809={'GYNiM':function(_0x7dc829,_0x2fc4a0,_0x53e7e0,_0x1e2b0a,_0x511d2c,_0xb3eb73){return _0x7dc829(_0x2fc4a0,_0x53e7e0,_0x1e2b0a,_0x511d2c,_0xb3eb73);},'yBpvl':_0x520a1f(0x24b,0x25b,0x244,'$kb1',0x26b),'NkPIe':function(_0x169161,_0x10c307){return _0x169161+_0x10c307;}};function _0x520a1f(_0x5dd3d2,_0x59c63c,_0x338769,_0x4d1dc4,_0x1c7908){return _0x2a47(_0x5dd3d2-0x228,_0x4d1dc4);}function _0xec7961(_0x583444,_0x532d85,_0x116650,_0x55c733,_0x3b2980){return _0x2a47(_0x532d85-0x285,_0x116650);}_0xa53809['GYNiM'](_0x598de5,_0xa53809['yBpvl'],_0x440ffd,_0x376519,_0x3a8980,_0xa53809['NkPIe'](_0xa53809['NkPIe']('[',_0x440ffd['label']),_0x520a1f(0x259,0x275,0x24e,'V$mk',0x262)));},"\u006d\u006f\u0062\u0069\u006c\u0065\u0050\u0068\u006f\u006e\u0065"(_0x485722,_0x75b59b,_0x3fa8df){const _0x25e4cf={'deOlv':function(_0x682527,_0x358fb5){return _0x682527+_0x358fb5;},'CtHga':_0x354dc3(0x328,0x318,0x2f3,0x31b,0x314)};function _0xe24e8f(_0x420f12,_0x38dd6d,_0x2766d5,_0x10419f,_0xbf86af){return _0x3474(_0x2766d5-0x2f3,_0xbf86af);}function _0x354dc3(_0x191393,_0x5c4cd7,_0x28f26c,_0x474fd2,_0x6a19a6){return _0x3474(_0x6a19a6-0x2f7,_0x28f26c);}_0x598de5(_0xe24e8f(0x337,0x347,0x34b,0x327,0x35a),_0x485722,_0x75b59b,_0x3fa8df,_0x25e4cf['deOlv']('[',_0x485722['label'])+_0x25e4cf['CtHga']);},'noBlankStart'(_0x42a47b,_0x547667,_0x2a874d){},'noBlankEnd'(_0x1937e6,_0x24e5ce,_0x30701d){},"\u006c\u0065\u0074\u0074\u0065\u0072\u0053\u0074\u0061\u0072\u0074\u004e\u0075\u006d\u0062\u0065\u0072\u0049\u006e\u0063\u006c\u0075\u0064\u0065\u0064"(_0x12a1d9,_0x4fba52,_0x2c9559){function _0x45b325(_0x253ea8,_0x501070,_0x5aa268,_0x5dfc5d,_0x375f6c){return _0x2a47(_0x5dfc5d- -0x2bf,_0x253ea8);}function _0x21e3bb(_0x2f0725,_0x3cc975,_0x139699,_0x43fd53,_0xbe6f0a){return _0x3474(_0xbe6f0a-0x227,_0x3cc975);}const _0x4e30e8={"\u0052\u006d\u0054\u0059\u0077":function(_0x41a1fd,_0x3405a2){return _0x41a1fd+_0x3405a2;},"\u0050\u0063\u006c\u0058\u0050":_0x45b325('YeeE',-0x277,-0x27b,-0x277,-0x248)};_0x598de5(_0x21e3bb(0x250,0x23d,0x263,0x24d,0x23d),_0x12a1d9,_0x4fba52,_0x2c9559,_0x4e30e8['RmTYw']("\u005b",_0x12a1d9['label'])+_0x4e30e8['PclXP']);},'noChinese'(_0x3a4a5c,_0x5dc0a8,_0x331ad4){function _0x59185a(_0x86e481,_0x16d77f,_0x5d5783,_0x3808f1,_0x43ce68){return _0x2a47(_0x43ce68-0x340,_0x16d77f);}function _0x367dab(_0x5dc01a,_0x59af11,_0x4e62a1,_0x3e86a8,_0x7ac3fa){return _0x3474(_0x3e86a8- -0x344,_0x59af11);}_0x598de5(_0x59185a(0x374,'oxSn',0x385,0x35c,0x38a),_0x3a4a5c,_0x5dc0a8,_0x331ad4,'['+_0x3a4a5c['label']+_0x367dab(-0x31b,-0x314,-0x2c5,-0x2f2,-0x303));},"\u0063\u0068\u0069\u006e\u0065\u0073\u0065"(_0x5501fd,_0x2103e5,_0x5c121d){const _0x592b5d={'hVoqC':function(_0x4ba8eb,_0x5a6cfb){return _0x4ba8eb+_0x5a6cfb;}};function _0x4a6062(_0xcccb17,_0x495c86,_0x107ebe,_0x4f908e,_0x400cd1){return _0x2a47(_0x107ebe- -0x20,_0x400cd1);}function _0x1fbbcb(_0x3a87bf,_0x4c7cec,_0x48a21d,_0x2d2a18,_0x3aa169){return _0x3474(_0x4c7cec-0x2d9,_0x3aa169);}_0x598de5(_0x1fbbcb(0x2d4,0x2e9,0x2b8,0x2f7,0x2f8),_0x5501fd,_0x2103e5,_0x5c121d,_0x592b5d['hVoqC']('['+_0x5501fd['label'],_0x4a6062(0x22,0x48,0x1a,0xc,'dVen')));},'email'(_0x5a816a,_0x3c321c,_0x4ae8fb){function _0x22eb4f(_0xc727ce,_0x4e1b33,_0x2c91a7,_0x12eee8,_0x2177d8){return _0x3474(_0x4e1b33- -0x2fd,_0x2c91a7);}function _0x5e773f(_0x3c1598,_0x3a635b,_0x1e6622,_0x28e837,_0x622cfd){return _0x3474(_0x622cfd- -0xc2,_0x1e6622);}_0x598de5(_0x22eb4f(-0x2da,-0x2ee,-0x316,-0x2e1,-0x2d1),_0x5a816a,_0x3c321c,_0x4ae8fb,'['+_0x5a816a['label']+_0x22eb4f(-0x2fc,-0x2e2,-0x30a,-0x2e2,-0x2e8));},'url'(_0x332a7e,_0x19bb74,_0x36b911){function _0x295b4b(_0x14ac01,_0x3a58ae,_0x256b1e,_0x2dd24b,_0x26a474){return _0x3474(_0x2dd24b-0xd8,_0x14ac01);}const _0x2fb9b3={'TuIwF':function(_0x1156a5,_0x23075e){return _0x1156a5+_0x23075e;}};function _0x1f39ae(_0x35d814,_0x4cec7c,_0x506daa,_0x57a6c9,_0x1b3f30){return _0x2a47(_0x57a6c9-0x61,_0x1b3f30);}_0x598de5(_0x295b4b(0xcc,0xd8,0xdc,0xf1,0x118),_0x332a7e,_0x19bb74,_0x36b911,_0x2fb9b3['TuIwF']("\u005b"+_0x332a7e['label'],_0x1f39ae(0x9f,0xc4,0xbf,0xa4,'#%kR')));},'regExp'(_0x367a36,_0x1171b3,_0x3d8c82){const _0x56d145={'pyOKn':function(_0x230ba4,_0x6ae02b){return _0x230ba4(_0x6ae02b);},'ziLDs':function(_0x5b57ee,_0x2daf16){return _0x5b57ee===_0x2daf16;},'Uuhdf':function(_0x283459,_0x2ce509){return _0x283459===_0x2ce509;}};if(isNull(_0x1171b3)||_0x1171b3['length']<=(0xb19bf^0xb19bf)){if(_0x13cd50("aSK5".split("").reverse().join(""),-0x28b,-0x295,-0x260,-0x279)!==_0x13cd50('BeEl',-0x277,-0x274,-0x2b6,-0x297)){_0x3d8c82();return;}else{_0x3d7c9c();}}function _0xc31926(_0x2eecd3,_0xd49997,_0x46c2c2,_0x3f9cfe,_0x4cb30c){return _0x3474(_0x2eecd3- -0x2e8,_0x3f9cfe);}const _0x5d312a=_0x56d145['pyOKn'](eval,_0x367a36['regExp']);function _0x299ee5(_0x55b5ef,_0xfee3ab,_0x330704,_0x531f20,_0xcde3dc){return _0x3474(_0x330704-0xee,_0xfee3ab);}function _0x1d0078(_0x444b50,_0x889d9d,_0x20f49f,_0x7a7bd4,_0x1c3bab){return _0x3474(_0x1c3bab- -0x2d,_0x20f49f);}function _0x13cd50(_0x1c4c49,_0x11e4f8,_0x178e97,_0x3f589e,_0x2acafc){return _0x2a47(_0x2acafc- -0x2ae,_0x1c4c49);}function _0x4d2782(_0x5aec4f,_0x1ad1a1,_0x16e936,_0x478764,_0x12e319){return _0x3474(_0x1ad1a1-0x281,_0x5aec4f);}function _0x16cf20(_0x1b67ba,_0xbfccf0,_0x96c11,_0xac7603,_0x213a4f){return _0x2a47(_0x213a4f-0x6a,_0xac7603);}function _0x1b11b9(_0x2c1436,_0x171422,_0x5a9fd8,_0x43a9b5,_0x51ae51){return _0x3474(_0x51ae51- -0xf5,_0x43a9b5);}function _0x317dba(_0x1cd977,_0x4dfc99,_0x1c3bde,_0x513949,_0x21ea11){return _0x2a47(_0x513949-0x43,_0x21ea11);}if(!_0x5d312a["\u0074\u0065\u0073\u0074"](_0x1171b3)){if(_0x56d145['ziLDs'](_0x299ee5(0xe8,0x11f,0x117,0x11b,0xfa),_0x1b11b9(-0xbd,-0xf2,-0xbc,-0xdc,-0xcc))){let _0x373bf9=_0x367a36['errorMsg']||'['+_0x367a36['label']+_0x13cd50('Rr)9',-0x247,-0x235,-0x261,-0x25a);_0x56d145['pyOKn'](_0x3d8c82,new Error(_0x373bf9));}else{_0x271a7d(_0x1d0078(0x11,0x3d,0x5a,0xa,0x2c),_0x39dab8,_0x18dd0f,_0x2abbd6,'['+_0x419589['label']+_0x1d0078(0x1a,-0x19,0x2b,0x15,0x12));}}else{if(_0x56d145['Uuhdf'](_0xc31926(-0x2e8,-0x2ba,-0x2ce,-0x304,-0x2bd),_0xc31926(-0x2d0,-0x2b5,-0x300,-0x2c1,-0x2ae))){_0x29f906();return;}else{_0x3d8c82();}}}};
|
5
|
-
|
3
|
+
export const getRegExp = function (validatorName) {
|
4
|
+
const commonRegExp = {
|
5
|
+
number: '/^[-]?\\d+(\\.\\d+)?$/',
|
6
|
+
letter: '/^[A-Za-z]+$/',
|
7
|
+
letterAndNumber: '/^[A-Za-z0-9]+$/',
|
8
|
+
mobilePhone: '/^[1][3-9][0-9]{9}$/',
|
9
|
+
letterStartNumberIncluded: '/^[A-Za-z]+[A-Za-z\\d]*$/',
|
10
|
+
noChinese: '/^[^\u4e00-\u9fa5]+$/',
|
11
|
+
chinese: '/^[\u4e00-\u9fa5]+$/',
|
12
|
+
email: '/^([-_A-Za-z0-9.]+)@([_A-Za-z0-9]+\\.)+[A-Za-z0-9]{2,3}$/',
|
13
|
+
url: '/^([hH][tT]{2}[pP]:\\/\\/|[hH][tT]{2}[pP][sS]:\\/\\/)(([A-Za-z0-9-~]+)\\.)+([A-Za-z0-9-~\\/])+$/',
|
14
|
+
}
|
15
|
+
|
16
|
+
return commonRegExp[validatorName]
|
17
|
+
}
|
18
|
+
|
19
|
+
const validateFn = function (validatorName, rule, value, callback, defaultErrorMsg) {
|
20
|
+
//空值不校验
|
21
|
+
if (isNull(value) || (value.length <= 0)) {
|
22
|
+
callback()
|
23
|
+
return
|
24
|
+
}
|
25
|
+
|
26
|
+
const reg = evalFn(getRegExp(validatorName))
|
27
|
+
|
28
|
+
if (!reg.test(value)) {
|
29
|
+
let errTxt = rule.errorMsg || defaultErrorMsg
|
30
|
+
callback(new Error(errTxt))
|
31
|
+
} else {
|
32
|
+
callback()
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
const FormValidators = {
|
37
|
+
|
38
|
+
/* 数字 */
|
39
|
+
number(rule, value, callback) {
|
40
|
+
validateFn('number', rule, value, callback, '[' + rule.label + ']包含非数字字符')
|
41
|
+
},
|
42
|
+
|
43
|
+
/* 字母 */
|
44
|
+
letter(rule, value, callback) {
|
45
|
+
validateFn('letter', rule, value, callback, '[' + rule.label + ']包含非字母字符')
|
46
|
+
},
|
47
|
+
|
48
|
+
/* 字母和数字 */
|
49
|
+
letterAndNumber(rule, value, callback) {
|
50
|
+
validateFn('letterAndNumber', rule, value, callback, '[' + rule.label + ']只能输入字母或数字')
|
51
|
+
},
|
52
|
+
|
53
|
+
/* 手机号码 */
|
54
|
+
mobilePhone(rule, value, callback) {
|
55
|
+
validateFn('mobilePhone', rule, value, callback, '[' + rule.label + ']手机号码格式有误')
|
56
|
+
},
|
57
|
+
|
58
|
+
/* 禁止空白字符开头 */
|
59
|
+
noBlankStart(rule, value, callback) {
|
60
|
+
//暂未实现
|
61
|
+
},
|
62
|
+
|
63
|
+
/* 禁止空白字符结尾 */
|
64
|
+
noBlankEnd(rule, value, callback) {
|
65
|
+
//暂未实现
|
66
|
+
},
|
67
|
+
|
68
|
+
/* 字母开头,仅可包含数字 */
|
69
|
+
letterStartNumberIncluded(rule, value, callback) {
|
70
|
+
validateFn('letterStartNumberIncluded', rule, value, callback, '[' + rule.label + ']必须以字母开头,可包含数字')
|
71
|
+
},
|
72
|
+
|
73
|
+
/* 禁止中文输入 */
|
74
|
+
noChinese(rule, value, callback) {
|
75
|
+
validateFn('noChinese', rule, value, callback, '[' + rule.label + ']不可输入中文字符')
|
76
|
+
},
|
77
|
+
|
78
|
+
/* 必须中文输入 */
|
79
|
+
chinese(rule, value, callback) {
|
80
|
+
validateFn('chinese', rule, value, callback, '[' + rule.label + ']只能输入中文字符')
|
81
|
+
},
|
82
|
+
|
83
|
+
/* 电子邮箱 */
|
84
|
+
email(rule, value, callback) {
|
85
|
+
validateFn('email', rule, value, callback, '[' + rule.label + ']邮箱格式有误')
|
86
|
+
},
|
87
|
+
|
88
|
+
/* URL网址 */
|
89
|
+
url(rule, value, callback) {
|
90
|
+
validateFn('url', rule, value, callback, '[' + rule.label + ']URL格式有误')
|
91
|
+
},
|
92
|
+
|
93
|
+
/*测试
|
94
|
+
test(rule, value, callback, errorMsg) {
|
95
|
+
//空值不校验
|
96
|
+
if (isNull(value) || (value.length <= 0)) {
|
97
|
+
callback()
|
98
|
+
return
|
99
|
+
}
|
100
|
+
|
101
|
+
if (value < 100) {
|
102
|
+
callback(new Error('[' + rule.label + ']不能小于100'))
|
103
|
+
} else {
|
104
|
+
callback()
|
105
|
+
}
|
106
|
+
},
|
107
|
+
*/
|
108
|
+
|
109
|
+
regExp(rule, value, callback) {
|
110
|
+
//空值不校验
|
111
|
+
if (isNull(value) || (value.length <= 0)) {
|
112
|
+
callback()
|
113
|
+
return
|
114
|
+
}
|
115
|
+
|
116
|
+
if (rule.regExp.length > 0 && rule.regExp[0] !== '/') {
|
117
|
+
rule.regExp = '/' + rule.regExp
|
118
|
+
}
|
119
|
+
if (rule.regExp.length > 0 && rule.regExp[rule.regExp.length - 1] !== '/') {
|
120
|
+
rule.regExp = rule.regExp + '/'
|
121
|
+
}
|
122
|
+
|
123
|
+
const pattern = evalFn(rule.regExp)
|
124
|
+
if (!pattern.test(value)) {
|
125
|
+
let errTxt = rule.errorMsg || '[' + rule.label + ']invalid value'
|
126
|
+
callback(new Error(errTxt))
|
127
|
+
} else {
|
128
|
+
callback()
|
129
|
+
}
|
130
|
+
},
|
131
|
+
|
132
|
+
}
|
133
|
+
|
134
|
+
export default FormValidators
|
package/src/utils/vab.js
CHANGED
@@ -956,7 +956,7 @@ install = (Vue, opts = {}) => {
|
|
956
956
|
|
957
957
|
imFun.Form.methods.$baseValidate = function (callback, opt) {
|
958
958
|
let that = this;
|
959
|
-
that.validate((valid, obj) => {
|
959
|
+
that.validate((valid, obj,c,d) => {
|
960
960
|
if (!valid && (!opt || opt.errorTip !== false)) {
|
961
961
|
this.$message({
|
962
962
|
message: this.$t2("必填项不能为空", "system.message.required"),
|
@@ -1074,7 +1074,11 @@ install = (Vue, opts = {}) => {
|
|
1074
1074
|
let val = i18n._t(path, lang, {zh: {[path]: path}}, null, values);
|
1075
1075
|
return val;
|
1076
1076
|
} else {
|
1077
|
-
|
1077
|
+
if(!i18n.te(path)){
|
1078
|
+
return i18n._t(path, lang, {zh: {[path]: path}}, null, values);
|
1079
|
+
}else{
|
1080
|
+
return i18n.t(path, values);
|
1081
|
+
}
|
1078
1082
|
}
|
1079
1083
|
};
|
1080
1084
|
|