From 55f346accfb6b70bed953911e701786244547594 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 09:38:52 +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=B6label=E8=8E=B7=E5=8F=96=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 | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/compenents/tree-category/index.tsx b/src/compenents/tree-category/index.tsx index 85ae164..88795b9 100644 --- a/src/compenents/tree-category/index.tsx +++ b/src/compenents/tree-category/index.tsx @@ -70,20 +70,14 @@ export const TreeCategory = (props: PropInterface) => { const onSelect = (selectedKeys: any, info: any) => { let label = "全部" + props.text; if (info) { - label = info.node.title; + label = info.node.title.props.children.props.children; } + console.log(info); props.onUpdate(selectedKeys, label); setSelectKey(selectedKeys); }; - const onExpand = (selectedKeys: any, info: any) => { - let label = "全部" + props.text; - if (info) { - label = info.node.title; - } - props.onUpdate(selectedKeys, label); - setSelectKey(selectedKeys); - }; + const onExpand = (selectedKeys: any, info: any) => {}; return (