在需要强制刷新的组件中添加
v-if="hackReset"
data中设置
hackReset : false
点击按钮触发显示该组件的methods应执行下面代码:
this.$nextTick(() => {
this.hackReset = true
})
v-if="hackReset"
hackReset : false
点击按钮触发显示该组件的methods应执行下面代码:
this.$nextTick(() => {
this.hackReset = true
})