mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 00:26:20 +08:00
fix: cloneDeep tab close #4158
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vben-core/shared": "workspace:*",
|
"@vben-core/shared": "workspace:*",
|
||||||
"@vben-core/typings": "workspace:*",
|
"@vben-core/typings": "workspace:*",
|
||||||
|
"es-toolkit": "^1.15.1",
|
||||||
"pinia": "2.2.1",
|
"pinia": "2.2.1",
|
||||||
"pinia-plugin-persistedstate": "^3.2.1",
|
"pinia-plugin-persistedstate": "^3.2.1",
|
||||||
"vue": "^3.4.37",
|
"vue": "^3.4.37",
|
||||||
|
@@ -5,6 +5,7 @@ import { toRaw } from 'vue';
|
|||||||
|
|
||||||
import { openWindow, startProgress, stopProgress } from '@vben-core/shared';
|
import { openWindow, startProgress, stopProgress } from '@vben-core/shared';
|
||||||
|
|
||||||
|
import { cloneDeep } from 'es-toolkit';
|
||||||
import { acceptHMRUpdate, defineStore } from 'pinia';
|
import { acceptHMRUpdate, defineStore } from 'pinia';
|
||||||
|
|
||||||
interface TabbarState {
|
interface TabbarState {
|
||||||
@@ -478,17 +479,7 @@ function cloneTab(route: TabDefinition): TabDefinition {
|
|||||||
if (!route) {
|
if (!route) {
|
||||||
return route;
|
return route;
|
||||||
}
|
}
|
||||||
const { matched, ...opt } = route;
|
return cloneDeep(route);
|
||||||
return {
|
|
||||||
...opt,
|
|
||||||
matched: (matched
|
|
||||||
? matched.map((item) => ({
|
|
||||||
meta: item.meta,
|
|
||||||
name: item.name,
|
|
||||||
path: item.path,
|
|
||||||
}))
|
|
||||||
: undefined) as RouteRecordNormalized[],
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
@@ -1037,6 +1037,9 @@ importers:
|
|||||||
'@vben-core/typings':
|
'@vben-core/typings':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../@core/base/typings
|
version: link:../@core/base/typings
|
||||||
|
es-toolkit:
|
||||||
|
specifier: ^1.15.1
|
||||||
|
version: 1.15.1
|
||||||
pinia:
|
pinia:
|
||||||
specifier: 2.2.1
|
specifier: 2.2.1
|
||||||
version: 2.2.1(typescript@5.5.4)(vue@3.4.37(typescript@5.5.4))
|
version: 2.2.1(typescript@5.5.4)(vue@3.4.37(typescript@5.5.4))
|
||||||
@@ -5500,6 +5503,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==}
|
resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
|
|
||||||
|
es-toolkit@1.15.1:
|
||||||
|
resolution: {integrity: sha512-2rPCylgxxpgZ3jQLyvbm+B9dNAMdHv4S80iabK9njEWxDbObhAPJCQUpqHv8iaOZrfprl3UlWhfxZd7kKSQtbg==}
|
||||||
|
|
||||||
esbuild@0.19.12:
|
esbuild@0.19.12:
|
||||||
resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==}
|
resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
@@ -14536,6 +14542,8 @@ snapshots:
|
|||||||
is-date-object: 1.0.5
|
is-date-object: 1.0.5
|
||||||
is-symbol: 1.0.4
|
is-symbol: 1.0.4
|
||||||
|
|
||||||
|
es-toolkit@1.15.1: {}
|
||||||
|
|
||||||
esbuild@0.19.12:
|
esbuild@0.19.12:
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@esbuild/aix-ppc64': 0.19.12
|
'@esbuild/aix-ppc64': 0.19.12
|
||||||
|
Reference in New Issue
Block a user