mirror of
https://github.com/PlayEdu/backend
synced 2025-06-26 21:22:45 +08:00
资源分类组件label获取优化
This commit is contained in:
parent
b4ea8248e0
commit
55f346accf
@ -70,20 +70,14 @@ export const TreeCategory = (props: PropInterface) => {
|
|||||||
const onSelect = (selectedKeys: any, info: any) => {
|
const onSelect = (selectedKeys: any, info: any) => {
|
||||||
let label = "全部" + props.text;
|
let label = "全部" + props.text;
|
||||||
if (info) {
|
if (info) {
|
||||||
label = info.node.title;
|
label = info.node.title.props.children.props.children;
|
||||||
}
|
}
|
||||||
|
console.log(info);
|
||||||
props.onUpdate(selectedKeys, label);
|
props.onUpdate(selectedKeys, label);
|
||||||
setSelectKey(selectedKeys);
|
setSelectKey(selectedKeys);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onExpand = (selectedKeys: any, info: any) => {
|
const onExpand = (selectedKeys: any, info: any) => {};
|
||||||
let label = "全部" + props.text;
|
|
||||||
if (info) {
|
|
||||||
label = info.node.title;
|
|
||||||
}
|
|
||||||
props.onUpdate(selectedKeys, label);
|
|
||||||
setSelectKey(selectedKeys);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user