|
@@ -30,23 +30,26 @@ export const routerMenus: Ref<IntergrationMenu[]> = ref([])
|
|
|
|
|
|
const firstLevelRouter = []
|
|
|
const secondLevelRouter = []
|
|
|
+const appFullscreens = []
|
|
|
export const secondLevelRouterKey = new Map<string, string[]>()
|
|
|
|
|
|
function emptyRouter(routers: IntergrationMenu[]) {
|
|
|
routers.forEach((item) => {
|
|
|
const hasChildren = item.children !== null && item.children.length > 0
|
|
|
- if (item.component === 'Layout' && hasChildren) {
|
|
|
+ if (item.fullscreen) {
|
|
|
+ appFullscreens.push(item)
|
|
|
+ } else if (item.component === 'Layout' && hasChildren) {
|
|
|
item.children?.forEach(child => {
|
|
|
child.path = item.path + '/' + child.path
|
|
|
firstLevelRouter.push(child)
|
|
|
- })
|
|
|
+ });
|
|
|
} else if (hasChildren) {
|
|
|
item.children!.forEach(child => {
|
|
|
child.path = child.path.replace(item.path + '/', '')
|
|
|
- })
|
|
|
- secondLevelRouter.push(item)
|
|
|
+ });
|
|
|
+ secondLevelRouter.push(item);
|
|
|
} else {
|
|
|
- firstLevelRouter.push(item)
|
|
|
+ firstLevelRouter.push(item);
|
|
|
}
|
|
|
|
|
|
if (item.children !== null && item.children.length > 0) {
|
|
@@ -108,6 +111,11 @@ async function beforeAddRoutes() {
|
|
|
...convertToRouter(secondLevelRouter),
|
|
|
]
|
|
|
})
|
|
|
+
|
|
|
+ convertToRouter(appFullscreens).forEach(item => {
|
|
|
+ router.addRoute(item)
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
|
|
|
function createNameComponent(item) {
|