在路由中为每个菜单选项添加title

pull/19/head
riverflow 9 months ago
parent 05835142af
commit 43d29b8b66

@ -24,37 +24,58 @@ const routes: Array<RouteRecordRaw> = [
{
path: '/dashboard',
name: 'dashboard',
component: () => import('@/views/dashboard/Index.vue')
component: () => import('@/views/dashboard/Index.vue'),
meta: {
title: '首页'
},
},
{
path: '/banner',
name: 'banner',
component: () => import('@/views/banner/Index.vue')
component: () => import('@/views/banner/Index.vue'),
meta: {
title: '广告管理'
},
},
{
path: '/category',
name: 'category',
component: () => import('@/views/category/Index.vue')
component: () => import('@/views/category/Index.vue'),
meta: {
title: '菜品分类'
},
},
{
path: '/comment',
name: 'comment',
component: () => import('@/views/comment/Index.vue')
component: () => import('@/views/comment/Index.vue'),
meta: {
title: '评论管理'
},
},
{
path: '/goods',
name: 'goods',
component: () => import('@/views/goods/Index.vue')
component: () => import('@/views/goods/Index.vue'),
meta: {
title: '菜品管理'
},
},
{
path: '/order',
name: 'order',
component: () => import('@/views/order/Index.vue')
component: () => import('@/views/order/Index.vue'),
meta: {
title: '订单管理'
},
},
{
path: '/user',
name: 'user',
component: () => import('@/views/user/Index.vue')
component: () => import('@/views/user/Index.vue'),
meta: {
title: '用户管理'
},
},
]
}

Loading…
Cancel
Save