We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22c658a commit 6e48d27Copy full SHA for 6e48d27
packages/lib/vue2/vue2-core/src/components/Widget.js
@@ -255,7 +255,11 @@ export default {
255
required: self.required,
256
propPath: path2prop(curNodePath)
257
});
258
- if (errors.length > 0) return callback(errors[0].message);
+ if (errors.length > 0) {
259
+ const errMsg = errors[0].message;
260
+ if (callback) callback(errMsg);
261
+ return Promise.reject(errMsg);
262
+ }
263
264
// customRule 如果存在自定义校验
265
const curCustomRule = self.$props.customRule;
@@ -268,7 +272,8 @@ export default {
268
272
269
273
}
270
274
271
- return callback();
275
+ if (callback) return callback();
276
+ return Promise.resolve();
277
},
278
trigger: 'change'
279
0 commit comments