Browse Source

fix: newTabTitle does not work as expected (#4160)

* fix: cloneDeep tab close #4158

* Revert "fix: cloneDeep tab close #4158"

This reverts commit 8e2f4b39ad.

* fix:  deep clone meta.newTabTitle
pull/4164/head
Zhang Zhi Chao 2 years ago
committed by GitHub
parent
commit
11551903f0
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      packages/stores/src/modules/tabbar.ts

6
packages/stores/src/modules/tabbar.ts

@ -478,7 +478,7 @@ function cloneTab(route: TabDefinition): TabDefinition {
if (!route) {
return route;
}
const { matched, ...opt } = route;
const { matched, meta, ...opt } = route;
return {
...opt,
matched: (matched
@ -488,6 +488,10 @@ function cloneTab(route: TabDefinition): TabDefinition {
path: item.path,
}))
: undefined) as RouteRecordNormalized[],
meta: {
...meta,
newTabTitle: meta.newTabTitle,
},
};
}

Loading…
Cancel
Save