From 01dfa4fd6f243a11fd0d15fe9342820a3aa57860 Mon Sep 17 00:00:00 2001 From: Gary Fu Date: Sun, 31 Mar 2024 11:16:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=9B=BE=E6=A0=87=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mock/MockMenus.js | 2 +- src/components/common-menu-item/index.vue | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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(() => {