From 7e786a3caf4497d1e16d169ce4dd0725175295fe Mon Sep 17 00:00:00 2001 From: rongxingsun Date: Wed, 24 Jul 2024 14:05:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?antd5=20=20=E6=A0=87=E7=AD=BE=E5=90=8D?= =?UTF-8?q?=E4=B8=8E=E5=9B=BE=E6=A0=87=E6=97=A0=E9=97=B4=E8=B7=9D=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/plugins/templates/keepalive/context.tpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/plugins/templates/keepalive/context.tpl b/packages/plugins/templates/keepalive/context.tpl index 7b0cf8e5..0e9312db 100644 --- a/packages/plugins/templates/keepalive/context.tpl +++ b/packages/plugins/templates/keepalive/context.tpl @@ -442,7 +442,8 @@ export function useKeepOutlets() { {...tabProps} {{#isNewTabsAPISupported}} items={Object.entries(keepElements.current).map(([pathname, {name, icon, closable, children, ...other}]: any) => ({ - label: <>{icon}{name}, + label: name, + icon: icon key: `${pathname?.toLowerCase()}::${tabNameMap[pathname?.toLowerCase()]}`, closable: Object.entries(keepElements.current).length === 1 ? false : closable, {{#hasFixedHeader}} From ac33fca814112116da857ab1c508ece56b255a23 Mon Sep 17 00:00:00 2001 From: rongxingsun Date: Wed, 24 Jul 2024 14:09:03 +0800 Subject: [PATCH 2/3] Update context.tpl --- packages/plugins/templates/keepalive/context.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugins/templates/keepalive/context.tpl b/packages/plugins/templates/keepalive/context.tpl index 0e9312db..a10ff8a0 100644 --- a/packages/plugins/templates/keepalive/context.tpl +++ b/packages/plugins/templates/keepalive/context.tpl @@ -443,7 +443,7 @@ export function useKeepOutlets() { {{#isNewTabsAPISupported}} items={Object.entries(keepElements.current).map(([pathname, {name, icon, closable, children, ...other}]: any) => ({ label: name, - icon: icon + icon: icon, key: `${pathname?.toLowerCase()}::${tabNameMap[pathname?.toLowerCase()]}`, closable: Object.entries(keepElements.current).length === 1 ? false : closable, {{#hasFixedHeader}} From 068965eaf3c695d665a60b262ace66eee7261993 Mon Sep 17 00:00:00 2001 From: rongxingsun Date: Fri, 27 Sep 2024 10:22:29 +0800 Subject: [PATCH 3/3] =?UTF-8?q?antd4=20=20=E6=A0=87=E7=AD=BE=E5=90=8D?= =?UTF-8?q?=E4=B8=8E=E5=9B=BE=E6=A0=87=E6=97=A0=E9=97=B4=E8=B7=9D=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/plugins/templates/keepalive/context.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/plugins/templates/keepalive/context.tpl b/packages/plugins/templates/keepalive/context.tpl index a10ff8a0..3b042eb0 100644 --- a/packages/plugins/templates/keepalive/context.tpl +++ b/packages/plugins/templates/keepalive/context.tpl @@ -463,7 +463,10 @@ export function useKeepOutlets() { } } {{/hasFixedHeader}} key={`${pathname?.toLowerCase()}::${tabNameMap[pathname?.toLowerCase()]}`} - tab={<>{icon}{name}} + tab={ + {icon} + {name} + } closable={Object.entries(keepElements.current).length === 1?false:closable} {...other} />