Vue.use(Router) export default new Router({ routes: [ { path:'/tr/:uid/:pid', name: 'tr', component:tr }, { path:'/tab', name: 'tab', component:tab } ] }) 需要在router.js 中使用vue-router,具體是在path:'/tr/:uid/:pid', 反斜杠后加冒號,意思是后面就是路由的參數(shù)。
www.dbjr.com.cn/article/1279...htm 2025-6-7