const routes = [
{
path: '',
name: 'home',
component: () => import(/* webpackChunkName: "home" */ '../pages/index'),
children: [
{
path: '',
name: 'welcome',
component: () => import(/* webpackChunkName: "welcome" */ '../views/content/welcome')
},
{
path: 'evaluator',
name: 'evaluator',
component: () => import(/* webpackChunkName: "evaluator" */ '../views/content/evaluator')
},
]
},
{
path: '/verify',
name: 'verify',
component: () => import(/* webpackChunkName: "verify" */ '../pages/verify')
},
{
// 无匹配应该重定向到主页,而不需要跳到指定页面,也不需要给特定的名字做标识
path: '/:chapters*',
redirect: { path: ' ' }
}
];
标签:vue,17,..,verify,component,Router4,import,path,webpackChunkName
From: https://www.cnblogs.com/yehuda/p/16988793.html