Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
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
ReactWeb5
wisdom-components
Commits
8e845271
Commit
8e845271
authored
Mar 30, 2021
by
涂茜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update device tree
parent
7fa415fc
Pipeline
#25205
failed with stages
in 1 minute 31 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
14 deletions
+27
-14
Basic.tsx
packages/DeviceTree/src/demos/Basic.tsx
+14
-12
index.js
packages/DeviceTree/src/index.js
+4
-2
index.less
packages/DeviceTree/src/index.less
+9
-0
No files found.
packages/DeviceTree/src/demos/Basic.tsx
View file @
8e845271
...
...
@@ -79,18 +79,20 @@ const Demo = () => {
};
return
(
<
PandaDeviceTree
onSearch=
{
onSearch
}
checkable
onExpand=
{
onExpand
}
expandedKeys=
{
expandedKeys
}
autoExpandParent=
{
autoExpandParent
}
onCheck=
{
onCheck
}
checkedKeys=
{
checkedKeys
}
onSelect=
{
onSelect
}
selectedKeys=
{
selectedKeys
}
treeData=
{
treeData
}
/>
<
div
style=
{
{
width
:
'300px'
,
height
:
'400px'
,
border
:
'1px solid #eee'
}
}
>
<
PandaDeviceTree
onSearch=
{
onSearch
}
checkable
onExpand=
{
onExpand
}
expandedKeys=
{
expandedKeys
}
autoExpandParent=
{
autoExpandParent
}
onCheck=
{
onCheck
}
checkedKeys=
{
checkedKeys
}
onSelect=
{
onSelect
}
selectedKeys=
{
selectedKeys
}
treeData=
{
treeData
}
/>
</
div
>
);
};
...
...
packages/DeviceTree/src/index.js
View file @
8e845271
...
...
@@ -22,8 +22,10 @@ const DeviceTree = (props) => {
onPressEnter
=
{
onSearch
}
/
>
<
Divider
/>
{
!!
treeData
.
length
&&
<
Tree
{...
props
}
/>
}
{
!
treeData
.
length
&&
<
Empty
/>
}
<
div
className
=
{
classNames
(
`
${
prefixCls
}
-content`
)}
>
{
!!
treeData
.
length
&&
<
Tree
{...
props
}
/>
}
{
!
treeData
.
length
&&
<
Empty
/>
}
<
/div
>
<
/div
>
);
};
...
...
packages/DeviceTree/src/index.less
View file @
8e845271
...
...
@@ -2,9 +2,18 @@
@device-tree-prefix-cls: ~'@{ant-prefix}-device-tree';
.@{device-tree-prefix-cls} {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
padding: 5px;
.ant-divider {
margin: 6px 0 12px 0;
}
&-content {
flex: 1;
overflow-y: scroll;
}
}
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