fix: 优化部分setTime 0 的写法

This commit is contained in:
ZhuRui
2026-08-06 11:56:37 +08:00
parent 15a6d81851
commit 130a253b83
12 changed files with 24 additions and 24 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { defineComponent, ref, reactive } from 'vue';
import { defineComponent, ref, reactive, nextTick } from 'vue';
import { useEffect } from '@/hooks';
import { Modal, Form, Input, Button, message } from 'ant-design-vue';
import { TIPS_TEXT, newPasswordRules, confirmNewPasswordRules } from './controller';
@@ -34,7 +34,7 @@ export default defineComponent({
useEffect(() => {
if (props.visible) {
Object.assign(formData, getDefaultForm());
setTimeout(() => formRef.value?.clearValidate(), 0);
nextTick().then(() => formRef.value?.clearValidate());
}
}, [() => props.visible]);