From 6c28a8e40c95b2aeca3d5c6aa0f4b84d621877ba Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Fri, 10 Dec 2021 15:52:13 +0800 Subject: [PATCH] fix: formItem error explain style #5004 close #5004 --- components/form/ErrorList.tsx | 2 +- components/form/FormItem.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/form/ErrorList.tsx b/components/form/ErrorList.tsx index 31b16b25b..1a1aa073c 100644 --- a/components/form/ErrorList.tsx +++ b/components/form/ErrorList.tsx @@ -44,7 +44,7 @@ export default defineComponent({ }); // Memo status in same visible watch([visible, status], () => { - if (visible.value && status.value) { + if (visible.value) { innerStatus.value = status.value; } }); diff --git a/components/form/FormItem.tsx b/components/form/FormItem.tsx index c0405b04c..7dc5727e9 100644 --- a/components/form/FormItem.tsx +++ b/components/form/FormItem.tsx @@ -245,13 +245,13 @@ export default defineComponent({ validateRules({ triggerName: 'change' }); }; const clearValidate = () => { - validateState.value = ''; + validateState.value = props.validateStatus; validateDisabled.value = false; errors.value = []; }; const resetField = () => { - validateState.value = ''; + validateState.value = props.validateStatus; validateDisabled.value = true; errors.value = []; const model = formContext.model.value || {};