[Feature][UI Next] Fixed menu sidebar display issues (#7872)
parent
da4a85943c
commit
f3f1f40f57
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
}),
|
||||
|
|
|
|||
Loading…
Reference in New Issue