<a-form-item
            field="loginAccount"
            label="登录账号"
            :rules="[
              { required: true, message: '请输入登录账号' }
            ]"
            :validate-trigger="['change', 'blur','input']"
          >
            <a-input v-model="form.loginAccount" />
          </a-form-item>
          <a-form-item
            field="loginPwd"
            label="登录密码"
            :rules="[
              { required: true, message: '请输入登录密码' },
            ]"
            :validate-trigger="['change', 'blur', 'focus', 'input']"
          >





setup(){
    const form = reactive({
      name: '',
      post: '',
      loginAccount: null,
    })}

            field="loginAccount",field绑定属性名,就可以校验此属性值,form里的值可以忽略
 

Logo

前往低代码交流专区

更多推荐