Commit 11551903 by Zhang Zhi Chao Committed by GitHub

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

* fix: cloneDeep tab close #4158

* Revert "fix: cloneDeep tab close #4158"

This reverts commit 8e2f4b39ad7442768bac964c6a113e5084b320a7.

* fix:  deep clone meta.newTabTitle
1 parent 187f946d
...@@ -478,7 +478,7 @@ function cloneTab(route: TabDefinition): TabDefinition { ...@@ -478,7 +478,7 @@ function cloneTab(route: TabDefinition): TabDefinition {
if (!route) { if (!route) {
return route; return route;
} }
const { matched, ...opt } = route; const { matched, meta, ...opt } = route;
return { return {
...opt, ...opt,
matched: (matched matched: (matched
...@@ -488,6 +488,10 @@ function cloneTab(route: TabDefinition): TabDefinition { ...@@ -488,6 +488,10 @@ function cloneTab(route: TabDefinition): TabDefinition {
path: item.path, path: item.path,
})) }))
: undefined) as RouteRecordNormalized[], : undefined) as RouteRecordNormalized[],
meta: {
...meta,
newTabTitle: meta.newTabTitle,
},
}; };
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!