Commit afab234b authored by XieZhiXiong's avatar XieZhiXiong

暴露勾选事件

parent 25ee2187
......@@ -39,6 +39,7 @@ export interface TabTreeProps extends TreeProps {
handleSubmit?();
toolsRender?: toolsRenderProps;
getMenuSelectData?(): Promise<any>;
handleCheck?: (keys: any, nodes: any) => {};
}
export interface InnermostTreeNodeProps {}
......@@ -212,6 +213,7 @@ const TabTree: React.FC<TabTreeProps> = props => {
showSave,
getMenuSelectData,
handleSubmit,
handleCheck,
} = props;
const selfActions = useTreeActions(actions)
......@@ -323,6 +325,10 @@ const TabTree: React.FC<TabTreeProps> = props => {
checked
? batchSelect(keys as any)
: setSelected(checkedNodes.map(v => v.key));
// 用户自定义的勾选后触发事件
if (handleCheck) {
handleCheck(keys, nodes);
}
}}
onSelect={(keys, e) => {
// 控制点击node时可以展开
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment