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
85749b10
Commit
85749b10
authored
Mar 14, 2024
by
徐乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 设备树组件增加first参数控制第一次进入不显示熊猫
parent
dcc62474
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
index.js
packages/base-components/DeviceTree/src/index.js
+5
-5
No files found.
packages/base-components/DeviceTree/src/index.js
View file @
85749b10
...
...
@@ -4,11 +4,11 @@ import classNames from 'classnames';
import
{
Input
,
Tree
,
Divider
,
ConfigProvider
}
from
'antd'
;
import
{
SearchOutlined
}
from
'@ant-design/icons'
;
import
Empty
from
'@wisdom-components/empty'
;
import
'./
index
.less'
;
import
'./
aa
.less'
;
const
DeviceTree
=
(
props
)
=>
{
const
{
prefix
,
placeholder
,
treeData
,
onSearch
}
=
props
;
const
{
prefix
,
placeholder
,
treeData
,
first
,
onSearch
}
=
props
;
console
.
log
(
first
,
treeData
)
const
{
getPrefixCls
}
=
useContext
(
ConfigProvider
.
ConfigContext
);
const
prefixCls
=
getPrefixCls
(
'device-tree'
);
...
...
@@ -24,7 +24,7 @@ const DeviceTree = (props) => {
<
Divider
/>
<
div
className
=
{
classNames
(
`
${
prefixCls
}
-content`
)}
>
{
!!
treeData
.
length
&&
<
Tree
{...
props
}
/>
}
{
!
treeData
.
length
&&
<
Empty
/>
}
{
!
treeData
.
length
&&
!
first
?
<
Empty
/>
:
''
}
<
/div
>
<
/div
>
);
...
...
@@ -34,7 +34,7 @@ DeviceTree.defaultProps = {
prefix
:
<
SearchOutlined
/>
,
placeholder
:
'搜索设备名称'
,
treeData
:
[],
onSearch
:
()
=>
{},
onSearch
:
()
=>
{
},
};
DeviceTree
.
propTypes
=
{
...
...
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