例如以下校验的placeValue中的trigger值不能为blur,要改为change,则可以在用户选择后获取到值

 dataRule: {
        companyName: [
          { required: true, message: "公司名称不能为空", trigger: "blur" },
          { validator: validateCompanyName, trigger: "blur" }
        ],
        companyAdminUser: [
          { required: true, message: "用户名不能为空", trigger: "blur" },
          { validator: validateCompanyAdminUser, trigger: "blur" }
        ],
        companyAdminPassword: [
          { required: true, message: "密码不能为空", trigger: "blur" },
          { validator: validatePassword, trigger: "blur" }
        ],
        confirmPassword: [
          { required: true, message: "确认密码不能为空", trigger: "blur" },
          { validator: validateComfirmPassword, trigger: "blur" }
        ],
        userPhoneNo: [
          { required: true, message: "手机号不能为空", trigger: "blur" },
          { validator: validateMobile, trigger: "blur" }
        ],
        placeValue: [{ validator: validatePlace, trigger: "change" }],
        companyType: [
          { required: true, message: "请选择公司使用设备类型", trigger: "blur" }
        ],
        useIndustryState: [
          { required: true, message: "请选择是否推送消息", trigger: "blur" }
        ],
        useIndustryPlatformState: [
          { required: true, message: "请选择是否使用行业平台", trigger: "blur" }
        ]
      },
     
     
Logo

前往低代码交流专区

更多推荐