From db16226dd1af9494acf980cd9ea03872e06f87f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com> Date: Wed, 10 May 2023 10:39:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=AD=9B=E9=80=89=E6=A1=86?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E9=80=89=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index c8d3eec..c67e52b 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -167,7 +167,11 @@ const IndexPage = () => { const onSelect = (selectedKeys: any, info: any) => { setCategoryId(selectedKeys[0]); - setCategoryText(info.node.title); + if (info.node.key === 0) { + setCategoryText(info.node.title); + } else { + setCategoryText(info.node.title.props.children); + } setSelectKey(selectedKeys); hide(); };