elementPlus select form validation automatically triggered

1. After editing, add select form verification to automatically trigger

import {
    
     getCurrentInstance, onMounted, onUnmounted, reactive, ref } from "vue";
setup() {
    
    
    const {
    
     proxy } = getCurrentInstance();
    const addOrg = () => {
    
    
      state.formEditDialog = true;
      state.fieldForm = {
    
    };
      //解决编辑表单后新增表单验证还在的bug
      proxy.$nextTick(() => {
    
    
        proxy.$refs.fieldFormRef.clearValidate();
        proxy.$forceUpdate();
      });
      state.dialogTitle = "新增字段";
      state.formEditFlag = false;
    };

Insert image description here

Guess you like

Origin blog.csdn.net/weixin_44705979/article/details/132144068