Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄庭坚
jinfa-platform
Commits
afab234b
Commit
afab234b
authored
Sep 12, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
暴露勾选事件
parent
25ee2187
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
index.tsx
src/components/TabTree/index.tsx
+6
-0
No files found.
src/components/TabTree/index.tsx
View file @
afab234b
...
@@ -39,6 +39,7 @@ export interface TabTreeProps extends TreeProps {
...
@@ -39,6 +39,7 @@ export interface TabTreeProps extends TreeProps {
handleSubmit
?();
handleSubmit
?();
toolsRender
?:
toolsRenderProps
;
toolsRender
?:
toolsRenderProps
;
getMenuSelectData
?():
Promise
<
any
>
;
getMenuSelectData
?():
Promise
<
any
>
;
handleCheck
?:
(
keys
:
any
,
nodes
:
any
)
=>
{};
}
}
export
interface
InnermostTreeNodeProps
{}
export
interface
InnermostTreeNodeProps
{}
...
@@ -212,6 +213,7 @@ const TabTree: React.FC<TabTreeProps> = props => {
...
@@ -212,6 +213,7 @@ const TabTree: React.FC<TabTreeProps> = props => {
showSave
,
showSave
,
getMenuSelectData
,
getMenuSelectData
,
handleSubmit
,
handleSubmit
,
handleCheck
,
}
=
props
;
}
=
props
;
const
selfActions
=
useTreeActions
(
actions
)
const
selfActions
=
useTreeActions
(
actions
)
...
@@ -323,6 +325,10 @@ const TabTree: React.FC<TabTreeProps> = props => {
...
@@ -323,6 +325,10 @@ const TabTree: React.FC<TabTreeProps> = props => {
checked
checked
?
batchSelect
(
keys
as
any
)
?
batchSelect
(
keys
as
any
)
:
setSelected
(
checkedNodes
.
map
(
v
=>
v
.
key
));
:
setSelected
(
checkedNodes
.
map
(
v
=>
v
.
key
));
// 用户自定义的勾选后触发事件
if
(
handleCheck
)
{
handleCheck
(
keys
,
nodes
);
}
}
}
}
}
onSelect=
{
(
keys
,
e
)
=>
{
onSelect=
{
(
keys
,
e
)
=>
{
// 控制点击node时可以展开
// 控制点击node时可以展开
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment