Problem: Open the pop-up window and save it, then reopen the pop-up window to trigger form verification
Solution: When opening the pop-up window, trigger the open function to clear the form verification
<el-dialog v-model="cardDialogVisible"
:title="cardDialogTitle"
:before-close="handleCloseCardDialog"
@open="handleOpeenCardDialog">
<el-form ref="formRef" :model="cardList" label-width="80">
.....
</el-form>
</el-dialog>
import {
ref, reactive, onMounted,nextTick } from "vue";
const formRef = ref();
const handleOpeenCardDialog = () => {
nextTick(()=>{
// 清空校验
formRef.value.clearValidate()
})
}