diff --git a/mock/MockMenus.js b/mock/MockMenus.js index 3ae6947..9448110 100644 --- a/mock/MockMenus.js +++ b/mock/MockMenus.js @@ -94,7 +94,7 @@ const allMenus = [ { id: 25, parentId: 2, - iconCls: 'TipsAndUpdatesOutlined', + iconCls: 'DynamicFormFilled', nameCn: '窗口表单示例', nameEn: 'Window Forms', menuUrl: '/window-forms' diff --git a/src/components/common-menu-item/index.vue b/src/components/common-menu-item/index.vue index 09b9d83..44a9289 100644 --- a/src/components/common-menu-item/index.vue +++ b/src/components/common-menu-item/index.vue @@ -2,6 +2,7 @@ import { computed } from 'vue' import { useRouter } from 'vue-router' import { useGlobalConfigStore } from '@/stores/GlobalConfigStore' +import { GlobalLayoutMode } from '@/consts/GlobalConstants' const router = useRouter() const globalConfigStore = useGlobalConfigStore() @@ -48,7 +49,9 @@ const dropdownClick = (menuItem, $event) => { } const checkShowMenuIcon = menuItem => { - return menuItem.icon && (globalConfigStore.showMenuIcon || (!menuItem.labelKey && !menuItem.label)) + return menuItem.icon && (globalConfigStore.showMenuIcon || + (!menuItem.labelKey && !menuItem.label) || + (globalConfigStore.isCollapseLeft && globalConfigStore.layoutMode === GlobalLayoutMode.LEFT)) } const showMenuIcon = computed(() => {