‘vue’ 路由的跳转方式

野见

关注

阅读 83

2022-02-23

1.

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

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

2.

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

3.

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

4.

 

 

 

相关推荐

精彩评论(0)

0 0 举报