fix: 优化部分setTime 0 的写法
This commit is contained in:
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user