mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 15:41:32 +08:00
fix: fix the problem of closing multiple tabs
This commit is contained in:
@@ -312,10 +312,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
&-lm {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
&__logo {
|
||||
padding: 0 10px;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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}`;
|
||||
});
|
||||
|
Reference in New Issue
Block a user