1.關閉當前標簽頁面,並跳轉到上一次頁面
this.$store.state.tagsView.visitedViews.splice(this.$store.state.tagsView.visitedViews.findIndex(item => item.path === this.$route.path), 1)
this.$router.push(this.$store.state.tagsView.visitedViews[this.$store.state.tagsView.visitedViews.length-1].path)
2.標簽激活時 activated 方法
tab標簽切換時會激活activated方法
activated: function() {
console.log("我被刷新了。。。。。。");
this.getList(); //重新獲取列表數據
}