需要nextTick和setTimeout一起用才能生效,刚开始只用了nextTick毫无作用,记录一下
nextTick(async () => {
setTimeout(async () => {
await Promise.all([
formRef1.value?.resetForm(),
formRef2.value?.resetForm()
]);
}, 30);
});
需要nextTick和setTimeout一起用才能生效,刚开始只用了nextTick毫无作用,记录一下
nextTick(async () => {
setTimeout(async () => {
await Promise.all([
formRef1.value?.resetForm(),
formRef2.value?.resetForm()
]);
}, 30);
});