File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/components/FormDesigner Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -210,19 +210,24 @@ export default {
210
210
this .setDefaultValue (genList[i]);
211
211
}
212
212
213
+
213
214
if (this .rules [genList[i].model ]) {
214
215
this .rules [genList[i].model ] = [... this .rules [genList[i].model ], ... genList[i].rules .map ((item ) => {
215
216
if (item .pattern ) {
216
217
// eslint-disable-next-line no-eval
217
- return { ... item, pattern: eval (item .pattern ) };
218
+ const rule = { ... item, pattern: eval (item .pattern ) };
219
+ rule .trigger = ' blur' ;
220
+ return rule;
218
221
}
219
222
return { ... item };
220
223
})];
221
224
} else {
222
225
this .rules [genList[i].model ] = [... genList[i].rules .map ((item ) => {
223
226
if (item .pattern ) {
224
227
// eslint-disable-next-line no-eval
225
- return { ... item, pattern: eval (item .pattern ) };
228
+ const rule = { ... item, pattern: eval (item .pattern ) };
229
+ rule .trigger = ' blur' ;
230
+ return rule;
226
231
}
227
232
return { ... item };
228
233
})];
You can’t perform that action at this time.
0 commit comments