- redirect: '/buyOne' // 重定向
- components: { // 复数 s , 同时展示不同内容 不同 router-view 用 name 区分
- default: BuyOne,
- bob: Test
- }
- path: '/about/:id',
- // name: 'About',
- // props: true, // 设为 true, 则可以在该页面的 props 中接收到 id
- this.$route.params
- // params id 有利于 SEO(搜索引擎优化) /a/b (SEM 搜索引擎营销)
- // query 主要用于查询
来源: http://www.bubuko.com/infodetail-3333484.html