Skip to content

Commit

Permalink
fix: fix the problem of closing multiple tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Nov 1, 2020
1 parent 4c658f4 commit 275ad9f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- 修复 mock 分页工具错误
- 修复表格开启搜索表单折叠问题
- 修复表格 size 为 samll 时候,fixed 列样式问题
- 修复多标签页关闭报错问题

## 2.0.0-rc.7 (2020-10-31)

Expand Down
7 changes: 2 additions & 5 deletions src/layouts/default/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,6 @@
}
}

&-lm {
display: flex;
}

&__logo {
padding: 0 10px;
}
Expand All @@ -333,7 +329,8 @@
display: flex;
align-items: center;
height: @header-height;
font-size: 1.1em;
padding: 0 2px;
font-size: 1.2em;
cursor: pointer;
}

Expand Down
4 changes: 2 additions & 2 deletions src/layouts/default/multitabs/useTabDropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ export function closeTab(closedTab: TabItem | AppRouteRecordRaw) {
const page = unref(getTabsState)[index - 1];
const { params, path, query } = page;
toObj = {
params,
params: params || {},
path,
query,
query: query || {},
};
}
const route = (unref(currentRoute) as unknown) as AppRouteRecordRaw;
Expand Down
4 changes: 0 additions & 4 deletions src/utils/helper/routeHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ export function genRouteModule(moduleList: AppRouteModule[]) {
const flatList = (toRaw(router.getRoutes()).filter(
(item) => item.children.length === 0
) as unknown) as AppRouteRecordRaw[];
try {
(router as any) = null;
} catch (error) {}

flatList.forEach((item) => {
item.path = `${layout ? layout.path : ''}${item.path}`;
});
Expand Down

0 comments on commit 275ad9f

Please sign in to comment.