watch: {
$route(newVal, oldVal){
console.log(newVal.path) this.setTags(newVal);
}
},
closeTags(index) { const delItem = this.tagsList.splice(index, 1)[0]; const item = this.tagsList[index] ? this.tagsList[index] : this.tagsList[index - 1]; if (item) {
console.log(item.path)
delItem.path === this.$route.fullPath && this.$router.push(item.path);
}else{ this.$router.push('/main');
}
}
添加回答
举报
0/150
提交
取消