forked from github/dataease
Merge pull request #10480 from dataease/pr@dev-v2@fix_submodule_menu
Pr@dev v2@fix submodule menu
This commit is contained in:
commit
bd66c3c57b
@ -148,6 +148,23 @@
|
||||
<artifactId>flexmark-all</artifactId>
|
||||
<version>${flexmark.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.dataease</groupId>
|
||||
<artifactId>xpack-permissions</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dataease</groupId>
|
||||
<artifactId>xpack-sync</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dataease</groupId>
|
||||
<artifactId>xpack-base</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -87,12 +87,12 @@ public class MenuManage {
|
||||
}
|
||||
|
||||
private boolean isXpackMenu(CoreMenu coreMenu) {
|
||||
if (coreMenu.getId().equals(21L)) return false;
|
||||
return coreMenu.getId().equals(7L)
|
||||
|| coreMenu.getPid().equals(7L)
|
||||
|| coreMenu.getId().equals(14L)
|
||||
|| coreMenu.getId().equals(17L)
|
||||
|| coreMenu.getId().equals(18L)
|
||||
|| coreMenu.getId().equals(21L)
|
||||
|| coreMenu.getPid().equals(21L)
|
||||
|| coreMenu.getId().equals(25L)
|
||||
|| coreMenu.getId().equals(26L)
|
||||
|
@ -0,0 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
</script>
|
||||
<template>
|
||||
<router-view :key="route.path" />
|
||||
</template>
|
@ -4,6 +4,7 @@ import { XpackComponent } from '@/components/plugin'
|
||||
const modules = import.meta.glob('../views/**/*.vue')
|
||||
export const Layout = () => import('@/layout/index.vue')
|
||||
const xpackComName = 'components/plugin'
|
||||
export const LayoutTransition = () => import('@/layout/components/LayoutTransition.vue')
|
||||
// 后端控制路由生成
|
||||
export const generateRoutesFn2 = (routes: AppCustomRouteRecordRaw[]): AppRouteRecordRaw[] => {
|
||||
const res: AppRouteRecordRaw[] = []
|
||||
@ -37,12 +38,14 @@ export const generateRoutesFn2 = (routes: AppCustomRouteRecordRaw[]): AppRouteRe
|
||||
let comModule = null
|
||||
if (route.component === xpackComName) {
|
||||
comModule = XpackComponent
|
||||
} else {
|
||||
} else if (!route.component.startsWith('Layout')) {
|
||||
comModule = modules[`../views/${route.component}/index.vue`]
|
||||
}
|
||||
|
||||
if (route.component === 'Layout') {
|
||||
data.component = Layout
|
||||
} else if (route.component === 'LayoutTransition') {
|
||||
data.component = LayoutTransition
|
||||
} else if (!comModule) {
|
||||
} else {
|
||||
data.component = comModule
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit 178f8f52209c1ffb81b58c8055733d411aef054a
|
||||
Subproject commit 05e2378fc74d5029527436d5965cf1d706223cd7
|
Loading…
Reference in New Issue
Block a user