路由配置

This commit is contained in:
zzyuan 2025-03-18 16:11:40 +08:00
parent 412e7319d5
commit c76fb1a5ce
1 changed files with 10 additions and 3 deletions

View File

@ -99,7 +99,13 @@ export const constantRoutes = [
component: () => import('@/views/dish/menu/detail'), component: () => import('@/views/dish/menu/detail'),
name: 'MenuDetail', name: 'MenuDetail',
meta: { title: '菜谱详情', icon: '' } meta: { title: '菜谱详情', icon: '' }
} },
{
path: 'menuEdit',
component: () => import('@/views/dish/menu/edit'),
name: 'menuEdit',
meta: { title: '菜谱编辑', icon: '' }
},
] ]
} }
] ]
@ -206,7 +212,8 @@ Router.prototype.replace = function push(location) {
} }
export default new Router({ export default new Router({
mode: 'history', // 去掉url中的# mode: 'hash', // 去掉url中的#
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes // base:"/glweb/",
routes: constantRoutes,
}) })