0
点赞
收藏
分享

微信扫一扫

‘vue’ 路由的跳转方式

野见 2022-02-23 阅读 79

1.

 //$router.push   可以跳到指定路径
  //push路径 :使用量大

   this.$router.push('/productlist')

2.

 //push 名字  使用量小
  this.$router.push({name:'ProductList'  })

3.

确保在router/index.js 里面配置了  路径和名字

4.

 

 

 

举报

相关推荐

0 条评论