diff --git a/dolphinscheduler-ui-next/src/layouts/content/index.tsx b/dolphinscheduler-ui-next/src/layouts/content/index.tsx index 58397f94e..d64e13698 100644 --- a/dolphinscheduler-ui-next/src/layouts/content/index.tsx +++ b/dolphinscheduler-ui-next/src/layouts/content/index.tsx @@ -54,12 +54,12 @@ const Content = defineComponent({ state.sideMenuOptions = state.menuOptions.filter((menu: { key: string }) => menu.key === key)[0] .children || [] - state.isShowSide = state.sideMenuOptions.length !== 0 } const getSideMenuOptions = (item: any) => { menuStore.setMenuKey(item.key) genSideMenu(state) + state.isShowSide = item.isShowSide } return { diff --git a/dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts b/dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts index 64ed045c9..9421498fa 100644 --- a/dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts +++ b/dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts @@ -77,11 +77,13 @@ export function useDataList() { label: t('menu.home'), key: 'home', icon: renderIcon(HomeOutlined), + isShowSide: false }, { label: t('menu.project'), key: 'project', icon: renderIcon(ProfileOutlined), + isShowSide: false, children: [ { label: t('menu.workflow_monitoring'), @@ -122,6 +124,7 @@ export function useDataList() { label: t('menu.resources'), key: 'resources', icon: renderIcon(FolderOutlined), + isShowSide: true, children: [ { label: t('menu.file_manage'), @@ -149,11 +152,13 @@ export function useDataList() { label: t('menu.datasource'), key: 'datasource', icon: renderIcon(DatabaseOutlined), + isShowSide: false }, { label: t('menu.monitor'), key: 'monitor', icon: renderIcon(DesktopOutlined), + isShowSide: true, children: [ { label: t('menu.service_manage'), @@ -191,6 +196,7 @@ export function useDataList() { label: t('menu.security'), key: 'security', icon: renderIcon(SafetyCertificateOutlined), + isShowSide: true, children: [ { label: t('menu.tenant_manage'), @@ -239,11 +245,12 @@ export function useDataList() { const changeHeaderMenuOptions = (state: any) => { state.headerMenuOptions = state.menuOptions.map( - (item: { label: string; key: string; icon: any }) => { + (item: { label: string; key: string; icon: any, isShowSide: boolean }) => { return { label: item.label, key: item.key, icon: item.icon, + isShowSide: item.isShowSide } } ) diff --git a/dolphinscheduler-ui-next/src/store/locales/locales.ts b/dolphinscheduler-ui-next/src/store/locales/locales.ts index 4cabc79fc..203f95b37 100644 --- a/dolphinscheduler-ui-next/src/store/locales/locales.ts +++ b/dolphinscheduler-ui-next/src/store/locales/locales.ts @@ -19,7 +19,7 @@ import { defineStore } from 'pinia' import { LocalesStore, Locales } from './types' export const useLocalesStore = defineStore({ - id: 'language', + id: 'locales', state: (): LocalesStore => ({ locales: 'zh_CN', }),