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
f38802ff
Commit
f38802ff
authored
Feb 23, 2023
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 提交AssemblyScroll变更
parent
e0af2891
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
index.js
packages/base-components/AlarmScrollAssembly/src/index.js
+10
-2
utils.js
...e-components/BasicReport/src/ReportsManage/utils/utils.js
+4
-0
No files found.
packages/base-components/AlarmScrollAssembly/src/index.js
View file @
f38802ff
...
...
@@ -13,6 +13,7 @@ import 'swiper/swiper.min.css';
import
'swiper/components/pagination/pagination.min.css'
;
import
'swiper/components/navigation/navigation.min.css'
;
import
SwiperCore
,
{
Autoplay
,
Pagination
,
Navigation
}
from
'swiper/core'
;
import
{
isFunction
,
isString
}
from
"../../BasicReport/src/ReportsManage/utils/utils"
;
SwiperCore
.
use
([
Autoplay
,
Pagination
,
Navigation
]);
/*
...
...
@@ -95,7 +96,11 @@ const AlarmScrollAssembly = (props) => {
},
[]);
return
(
<>
{
realTimeDataList
&&
realTimeDataList
.
length
?
<
div
{
realTimeDataList
&&
realTimeDataList
.
length
?
<>
{
props
.
prefix
?
<
span
>
{
props
.
prefix
}
<
/span> : '
'
}
<
div
className
=
{
classnames
(
styles
.
alarScrollAssembly
,
(
realTimeDataList
?.
length
>
1000
?
styles
.
moreThan1000
:
styles
.
lessThan1000
))}
id
=
{
'alarmListDiv'
}
>
<
Swiper
...
...
@@ -146,14 +151,17 @@ const AlarmScrollAssembly = (props) => {
/
>
<
/Modal
>
)}
<
/div> : ''
}
<
/div
>
<
/> : ''
}
<
/
>
);
};
AlarmScrollAssembly
.
defaultProps
=
{
deviceType
:
'二供泵房,二供机组'
,
prefix
:
''
};
AlarmScrollAssembly
.
propTypes
=
{
deviceType
:
PropTypes
.
string
,
prefix
:
PropTypes
.
string
};
export
default
AlarmScrollAssembly
;
packages/base-components/BasicReport/src/ReportsManage/utils/utils.js
View file @
f38802ff
...
...
@@ -10,6 +10,9 @@ const isNumber = (num) => {
const
isArray
=
(
arr
)
=>
{
return
Object
.
prototype
.
toString
.
call
(
arr
)
===
'[object Array]'
;
};
const
isFunction
=
(
obj
)
=>
{
return
Object
.
prototype
.
toString
.
call
(
obj
)
===
'[object Function]'
;
}
const
hasMoney
=
(
configItems
)
=>
{
if
(
!
configItems
)
return
false
;
let
_items
=
configItems
.
split
(
'|'
);
...
...
@@ -148,6 +151,7 @@ export {
isNumber
,
hasMoney
,
isArray
,
isFunction
,
returnHandledNumber
,
returnDefaultValueOrConfigs
,
downloadFunc
,
...
...
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