mirror of
https://github.com/PlayEdu/backend
synced 2025-06-21 07:18:45 +08:00
tree组件点击后分类名获取
This commit is contained in:
parent
9477110a0b
commit
f4aa89746b
@ -120,7 +120,7 @@ export const TreeDepartment = (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.onUpdate(selectedKeys, label);
|
||||
setSelectKey(selectedKeys);
|
||||
@ -129,7 +129,7 @@ export const TreeDepartment = (props: PropInterface) => {
|
||||
const onExpand = (selectedKeys: any, info: any) => {
|
||||
let label = "全部" + props.text;
|
||||
if (info) {
|
||||
label = info.node.title;
|
||||
label = info.node.title.props.children;
|
||||
}
|
||||
props.onUpdate(selectedKeys, label);
|
||||
setSelectKey(selectedKeys);
|
||||
|
Loading…
x
Reference in New Issue
Block a user