解决样式不清除的问题
<el-form-item label="xx" prop="cvhImgs">
<my-upload :fileList="form.cvhImgs" @changeImages="changeImagesDw" v-if="hackReset"></my-upload>
<!-- 此方法是封装的 -->
</el-form-item>
- 通过 v-if 进行清除
-
- 首先在data 中定义
hackReset:''
-
- 创建方法
detectInfo(){
this.hackReset = false
this.$nextTick(() => {
this.hackReset = true
})
}
-
- 在需要的地方进行调用
this.detectInfo();