mirror of
https://github.com/fugary/simple-element-plus-template.git
synced 2025-11-12 14:27:49 +00:00
菜单图标显示控制
This commit is contained in:
@@ -94,7 +94,7 @@ const allMenus = [
|
||||
{
|
||||
id: 25,
|
||||
parentId: 2,
|
||||
iconCls: 'TipsAndUpdatesOutlined',
|
||||
iconCls: 'DynamicFormFilled',
|
||||
nameCn: '窗口表单示例',
|
||||
nameEn: 'Window Forms',
|
||||
menuUrl: '/window-forms'
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user