nuxt.config.js覆写router:module.exports = {
router: {
base: '/',
routes: [
{ name: 'index', path: '/',
component: 'pages/index.vue'
},
{ name: 'test', path: '/test(.*?)?', //path: '/test(.*?)?',
component: 'pages/test'
},
{ name: 'testtwo', path: '/testtwo',
component: 'pages/testtwo'
}
],
}
}目的想配置可以解析路由上的任意多个params,但是:localhost:3000/test/1 就报找不到页面,
添加回答
举报
0/150
提交
取消