提交 275ad9f1 编写于 作者: V vben

fix: fix the problem of closing multiple tabs

上级 4c658f48
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
- 修复 mock 分页工具错误 - 修复 mock 分页工具错误
- 修复表格开启搜索表单折叠问题 - 修复表格开启搜索表单折叠问题
- 修复表格 size 为 samll 时候,fixed 列样式问题 - 修复表格 size 为 samll 时候,fixed 列样式问题
- 修复多标签页关闭报错问题
## 2.0.0-rc.7 (2020-10-31) ## 2.0.0-rc.7 (2020-10-31)
......
...@@ -312,10 +312,6 @@ ...@@ -312,10 +312,6 @@
} }
} }
&-lm {
display: flex;
}
&__logo { &__logo {
padding: 0 10px; padding: 0 10px;
} }
...@@ -333,7 +329,8 @@ ...@@ -333,7 +329,8 @@
display: flex; display: flex;
align-items: center; align-items: center;
height: @header-height; height: @header-height;
font-size: 1.1em; padding: 0 2px;
font-size: 1.2em;
cursor: pointer; cursor: pointer;
} }
......
...@@ -233,9 +233,9 @@ export function closeTab(closedTab: TabItem | AppRouteRecordRaw) { ...@@ -233,9 +233,9 @@ export function closeTab(closedTab: TabItem | AppRouteRecordRaw) {
const page = unref(getTabsState)[index - 1]; const page = unref(getTabsState)[index - 1];
const { params, path, query } = page; const { params, path, query } = page;
toObj = { toObj = {
params, params: params || {},
path, path,
query, query: query || {},
}; };
} }
const route = (unref(currentRoute) as unknown) as AppRouteRecordRaw; const route = (unref(currentRoute) as unknown) as AppRouteRecordRaw;
......
...@@ -28,10 +28,6 @@ export function genRouteModule(moduleList: AppRouteModule[]) { ...@@ -28,10 +28,6 @@ export function genRouteModule(moduleList: AppRouteModule[]) {
const flatList = (toRaw(router.getRoutes()).filter( const flatList = (toRaw(router.getRoutes()).filter(
(item) => item.children.length === 0 (item) => item.children.length === 0
) as unknown) as AppRouteRecordRaw[]; ) as unknown) as AppRouteRecordRaw[];
try {
(router as any) = null;
} catch (error) {}
flatList.forEach((item) => { flatList.forEach((item) => {
item.path = `${layout ? layout.path : ''}${item.path}`; item.path = `${layout ? layout.path : ''}${item.path}`;
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册