为了账号安全,请及时绑定邮箱和手机立即绑定

this.$router.push跳转的路由和watch监听的路由不一样?

this.$router.push跳转的路由和watch监听的路由不一样?

慕容708150 2019-02-04 00:06:27
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');         }       }
查看完整描述

1 回答

?
蛊毒传说

TA贡献1895条经验 获得超3个赞

console结果可以贴一下么,而且用store传路由路径是什么操作

查看完整回答
反对 回复 2019-02-04
  • 1 回答
  • 0 关注
  • 1650 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号