=============== 2019.11.05更新 ===========
后期页面改版:
点击添加/编辑时,进行的是路由跳转,产生的问题是就是,在“详情页”点击返回按钮进行this.$route.go(-1)时,回到的还是第一个tab页,而不是“福利通告”页对应的页面
思路:
页面路径跳转时,记住当前的activeName,而恰恰控制切换显示的applyTab刚刚好久满足需求,对,去给avtiveName赋值
增加代码:控制当前的activeName 成功搞定!
mounted () {
console.log('this.$store.state.name:', this.$store.state.name)
console.log(this.activeName)
if (this.$store.state.name) { //必须要有这个判断
this.activeName = this.$store.state.name // 点击Tab切换后
} else {
this.activeName = 'first' // 第一次进入页面时
}