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); };