vue-router 获得上一级路由以及返回上一级路由的方法

if (this.$store.state.previousRouter.name) {
          this.$router.push({name: this.$store.state.previousRouter.name});
}

  PS:this.$store.state.previousRouter.name  为上一级路由。

posted on 2017-08-11 10:36  程序猿-alvin  阅读(8425)  评论(0编辑  收藏  举报

导航