Browse Source

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
Zhang Zhi Chao 7 tháng trước cách đây
mục cha
commit
11551903f0
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      packages/stores/src/modules/tabbar.ts

+ 5 - 1
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,
+    },
   };
 }