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 {
210210 this .setDefaultValue (genList[i]);
211211 }
212212
213+
213214 if (this .rules [genList[i].model ]) {
214215 this .rules [genList[i].model ] = [... this .rules [genList[i].model ], ... genList[i].rules .map ((item ) => {
215216 if (item .pattern ) {
216217 // 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;
218221 }
219222 return { ... item };
220223 })];
221224 } else {
222225 this .rules [genList[i].model ] = [... genList[i].rules .map ((item ) => {
223226 if (item .pattern ) {
224227 // 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;
226231 }
227232 return { ... item };
228233 })];
You can’t perform that action at this time.
0 commit comments