|
@@ -93,7 +93,7 @@ const routesRegister = (menus, defaultRoutes, router) => {
|
|
|
const __def = 'Layout'
|
|
|
const loadComponent = import.meta.glob('../views/**/*.vue')
|
|
|
for (const route of menus) {
|
|
|
- const { type, route_name, path, component, parent_id, i18n_code } = route
|
|
|
+ const { type, route_name, path, component, parent_id, i18n_code, type } = route
|
|
|
// 检查路由是否已存在,存在跳过
|
|
|
const hasRoute = defaultRoutes.find((f) => f.path === path)
|
|
|
if (hasRoute) continue
|
|
@@ -102,7 +102,7 @@ const routesRegister = (menus, defaultRoutes, router) => {
|
|
|
const route = {
|
|
|
path: `/${route_name}`,
|
|
|
name: route_name,
|
|
|
- meta: { title: i18n_code }
|
|
|
+ meta: { title: i18n_code, type }
|
|
|
}
|
|
|
router.addRoute(__def, route)
|
|
|
} else if (type === '1' || type === '2') {
|
|
@@ -111,7 +111,8 @@ const routesRegister = (menus, defaultRoutes, router) => {
|
|
|
path: path,
|
|
|
name: route_name,
|
|
|
meta: {
|
|
|
- title: i18n_code
|
|
|
+ title: i18n_code,
|
|
|
+ type
|
|
|
},
|
|
|
component: loadComponent[`../views${component}.vue`]
|
|
|
}
|