vue3使用的vue-router4中默认路由写法
const constantRoutes: Array<RouteRecordRaw> = [{path: '/:catchAll(.*)',redirect: '/home',meta: {menuHide: true}},{path: '/',name: 'home',component: BasicLayout,redirect: '/home',meta: {.
·
const constantRoutes: Array<RouteRecordRaw> = [
{
path: '/:catchAll(.*)',
redirect: '/home',
meta: {
menuHide: true
}
},
{
path: '/',
name: 'home',
component: BasicLayout,
redirect: '/home',
meta: {
title: '首页',
menuHide: true // 不显示在左侧菜单栏
},
children: [
{
path: 'home',
name: 'Home',
component: () => import('@/views/Home.vue')
}
]
}
]
更多推荐
已为社区贡献1条内容
所有评论(0)