Vant 清除form表单校验的操作

1、在form表单上 加上 :key=“formKey”

<van-form colon ref="form" :key="formKey">

</van-form>

2、在data定义 formKey:0

data() {
    return {
      formKey: 0,
    }
},

3、在 activated 里加 this.formKey ++

activated() {
   this.formKey ++
},
posted @ 2024-01-26 13:33  唏嘘-  阅读(250)  评论(0编辑  收藏  举报