mirror of
https://github.com/PlayEdu/backend
synced 2025-12-23 05:39:38 +08:00
图片、视频label联动
This commit is contained in:
@@ -61,8 +61,8 @@ const items = [
|
||||
<i className="iconfont icon-icon-setting" />,
|
||||
[
|
||||
getItem("管理人员", "/system/administrator", null, null, null),
|
||||
getItem("系统配置", "/system/index", null, null, null),
|
||||
getItem("角色配置", "/system/adminroles", null, null, null),
|
||||
getItem("系统配置", "/system/index", null, null, null),
|
||||
],
|
||||
null
|
||||
),
|
||||
|
||||
@@ -10,7 +10,7 @@ interface Option {
|
||||
|
||||
interface PropInterface {
|
||||
text: string;
|
||||
onUpdate: (keys: any) => void;
|
||||
onUpdate: (keys: any, title: any) => void;
|
||||
}
|
||||
|
||||
export const TreeCategory = (props: PropInterface) => {
|
||||
@@ -59,7 +59,11 @@ export const TreeCategory = (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);
|
||||
};
|
||||
|
||||
@@ -75,7 +79,7 @@ export const TreeCategory = (props: PropInterface) => {
|
||||
>
|
||||
全部{props.text}
|
||||
</div>
|
||||
<Tree onSelect={onSelect} treeData={treeData} />
|
||||
<Tree onSelect={onSelect} treeData={treeData} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user