图片、视频label联动

This commit is contained in:
禺狨
2023-03-14 10:00:36 +08:00
parent 52126882ee
commit 558407b34f
5 changed files with 42 additions and 22 deletions

View File

@@ -10,7 +10,7 @@ interface Option {
interface PropInterface {
text: string;
onUpdate: (keys: any) => void;
onUpdate: (keys: any, title: any) => void;
}
export const TreeDepartment = (props: PropInterface) => {
@@ -60,7 +60,11 @@ export const TreeDepartment = (props: PropInterface) => {
};
const onSelect = (selectedKeys: any, info: any) => {
props.onUpdate(selectedKeys);
let label = "全部" + props.text;
if (info) {
label = info.node.title;
}
props.onUpdate(selectedKeys, label);
setSelectKey(selectedKeys);
};