Skip to content

Commit

Permalink
fix(menu): display error when contains hidden items
Browse files Browse the repository at this point in the history
修复顶栏菜单在包含隐藏项目时的显示问题
  • Loading branch information
mynetfan committed Jul 9, 2021
1 parent a9bbed1 commit 5ceeefd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
- **AppSearch** 修复可能会搜索隐藏菜单的问题
- **TableAction** 仅在 action.tooltip 存在的情况下 才包裹 Tooltip 组件
- **BasicUpload** 修复处理非`array`值时报错的问题
- **Form** 修复`FormItem``suffix`插槽样式问题
- **其它**
- 修复菜单默认折叠的配置不起作用的问题
- 修复`safari`浏览器报错导致网站打不开
- 修复在 window 上,拉取代码后 eslint 因 endOfLine 而保错问题
- 修复左侧混合菜单的悬停触发逻辑
- 修复顶栏菜单在显示包含需要隐藏的菜单项目时出错的问题

### 🎫 Chores

Expand Down
2 changes: 1 addition & 1 deletion src/router/menus/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const staticMenus: Menu[] = [];
async function getAsyncMenus() {
const permissionStore = usePermissionStore();
if (isBackMode()) {
return permissionStore.getBackMenuList;
return permissionStore.getBackMenuList.filter((item) => !item.meta?.hideMenu && !item.hideMenu);
}
if (isRouteMappingMode()) {
return permissionStore.getFrontMenuList.filter((item) => !item.hideMenu);
Expand Down

0 comments on commit 5ceeefd

Please sign in to comment.