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'); } }
蛊毒传说
相关分类