element - 规则验证 无效

需要主动触发

watch:{
'editform.h_photo'(val) {
            let that = this;
            that.$refs.editform.validateField('h_photo');
        },
}

//初始化
let that = this;
       this.$nextTick(() => {
       //设置图片
       that.$refs.editform.validateField('h_photo');
      });
posted @ 2020-12-18 09:34  gggggggxin  阅读(191)  评论(0编辑  收藏  举报