瀏覽代碼

fix: 没有icon 会导致其他 主题展示类型 菜单折叠无法查看问题 做默认icon

lanceJiang 1 年之前
父節點
當前提交
8584bbe1bf
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/store/modules/permission.ts

+ 1 - 0
src/store/modules/permission.ts

@@ -62,6 +62,7 @@ const getShowMenuList = (menuList: AppRouteRecordRaw[], parentPath = '') => {
 	return menuList.filter(item => {
 		// console.error(item, 'item')
 		item.meta = item.meta ? item.meta : {}
+		item.meta.icon = item.meta.icon || 'Menu'
 		// path全链 重组
 		item.path = /\/.*/.test(item.path) ? item.path : `${parentPath}/${item.path}`
 		if (!item.meta.hidden) {