解决:
经过以上分析,强制赋值应该在前次赋值而且DOM已经刷新完毕之后进行。可以使用$nextTick,以下是代码:
handleTabClick (tab) {
let name = this.filter1.tab
this.$router.push({name})
if (tab.name == 'second') {
this.$nextTick(() => {
this.filter1.tab = 'first'
})
}
},
原文:https://www.cnblogs.com/cag2050/p/10834590.html