diff --git a/src/uni_modules/wot-design-uni/components/wd-form/wd-form.vue b/src/uni_modules/wot-design-uni/components/wd-form/wd-form.vue index 37b44517d..dd6e48a6f 100644 --- a/src/uni_modules/wot-design-uni/components/wd-form/wd-form.vue +++ b/src/uni_modules/wot-design-uni/components/wd-form/wd-form.vue @@ -148,8 +148,12 @@ function getMergeRules() { } function showMessage(errors: ErrorMessage[]) { - const messages = errors.filter((error) => error.message) + const childrenProps = children.map((e) => e.prop).filter(Boolean) + const messages = errors.filter((error) => error.message && childrenProps.includes(error.prop)) if (messages.length) { + messages.sort((a, b) => { + return childrenProps.indexOf(a.prop) - childrenProps.indexOf(b.prop) + }) if (props.errorType === 'toast') { showToast(messages[0].message) } else if (props.errorType === 'message') {