From db20498317f913178783badddc6b3eb73ea946f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com> Date: Wed, 22 Mar 2023 10:06:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=88=86=E7=B1=BB=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/compenents/tree-category/index.tsx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/compenents/tree-category/index.tsx b/src/compenents/tree-category/index.tsx index 88795b9..47a173b 100644 --- a/src/compenents/tree-category/index.tsx +++ b/src/compenents/tree-category/index.tsx @@ -28,7 +28,7 @@ export const TreeCategory = (props: PropInterface) => { if (props.type === "no-cate") { new_arr.unshift({ key: 0, - title: "未分类", + title: 未分类, }); } @@ -42,9 +42,7 @@ export const TreeCategory = (props: PropInterface) => { for (let i = 0; i < categories[id].length; i++) { if (!categories[categories[id][i].id]) { let name = ( - <> - {categories[id][i].name} - + {categories[id][i].name} ); arr.push({ title: name, @@ -52,9 +50,7 @@ export const TreeCategory = (props: PropInterface) => { }); } else { let name = ( - <> - {categories[id][i].name} - + {categories[id][i].name} ); const new_arr: Option[] = checkArr(categories, categories[id][i].id); arr.push({ @@ -70,9 +66,8 @@ export const TreeCategory = (props: PropInterface) => { const onSelect = (selectedKeys: any, info: any) => { let label = "全部" + props.text; if (info) { - label = info.node.title.props.children.props.children; + label = info.node.title.props.children; } - console.log(info); props.onUpdate(selectedKeys, label); setSelectKey(selectedKeys); };