<component ref="XXX" v-show="isShow" @hidden="hidden"></component>

  子组件添加ref的属性,然后通过 this.$refs.属性名,获取子组件的DOM的所有元素 this.$refs.XXX
最后清空值

Object.assign(this.$refs.XXX.$data,this.$refs.XXX.$options.data());

  

相关文章: