Commit 354ba0fa authored by guxukai's avatar guxukai

chore: 菜单国际化

parent 79be3355
......@@ -9,7 +9,7 @@ export const formatRoute = arr => {
children: formatRoute(_.children ?? []),
}
if (_.meta.element) {
res.component = () => import(`@account/views/cropped/${_.meta.element}`) || null
res.component = () => import(`@account/views/${_.meta.fixed ? 'fixed' : 'cropped'}/${_.meta.element}`) || null
} else {
res.component = () => import(`@shared/layouts/pure-layout.vue`)
}
......
......@@ -9,7 +9,7 @@ export const formatRoute = arr => {
children: formatRoute(_.children ?? []),
}
if (_.meta.element) {
res.component = () => import(`@account/views/cropped/${_.meta.element}`) || null
res.component = () => import(`@federation/views/${_.meta.fixed ? 'fixed' : 'cropped'}/${_.meta.element}`) || null
} else {
res.component = () => import(`@shared/layouts/pure-layout.vue`)
}
......
......@@ -9,7 +9,8 @@ export const formatRoute = arr => {
children: formatRoute(_.children ?? []),
}
if (_.meta.element) {
res.component = () => import(`@account/views/cropped/${_.meta.element}`) || null
res.component = () =>
import(`@organization/views/${_.meta.fixed ? 'fixed' : 'cropped'}/${_.meta.element}`) || null
} else {
res.component = () => import(`@shared/layouts/pure-layout.vue`)
}
......
......@@ -9,7 +9,7 @@ export const formatRoute = arr => {
children: formatRoute(_.children ?? []),
}
if (_.meta.element) {
res.component = () => import(`@account/views/cropped/${_.meta.element}`) || null
res.component = () => import(`@super/views/${_.meta.fixed ? 'fixed' : 'cropped'}/${_.meta.element}`) || null
} else {
res.component = () => import(`@shared/layouts/pure-layout.vue`)
}
......
......@@ -428,9 +428,10 @@
"path": "user-management",
"name": "user-management",
"meta": { "title": "用户管理", "code": "auth.baas.setting.user",
"element": "home/index.vue",
"element": "settings/user-management/index.vue",
"level": 2,
"showInAsideMenu": true
"showInAsideMenu": true,
"fixed": true
}
},
{
......
import { createRouter, createWebHistory } from 'vue-router'
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import { LOOKUP_ROUTES, FIXED_ROUTES, SYSTEM_ROUTES } from '@shared/router/constants'
import { zookeeper } from '@shared/router/zookeeper'
......@@ -10,7 +10,7 @@ export const formatRoute = arr => {
children: formatRoute(_.children ?? []),
}
if (_.meta.element) {
res.component = () => import(`@account/views/cropped/${_.meta.element}`) || null
res.component = () => import(`@system/views/${_.meta.fixed ? 'fixed' : 'cropped'}/${_.meta.element}`) || null
} else {
res.component = () => import(`@shared/layouts/pure-layout.vue`)
}
......@@ -18,7 +18,6 @@ export const formatRoute = arr => {
})
}
export const CROPPED_ROUTES = formatRoute(require(`@system/json/routes.json`).children)
const routes = [
{
path: '/',
......
......@@ -5,5 +5,6 @@ declare module 'vue-router' {
title?: string
level?: number
showInAsideMenu?: boolean
fixed?: boolean
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment