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
16c6a2ff
Commit
16c6a2ff
authored
Feb 23, 2023
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 报警滚动条增加prefix参数
parent
f38802ff
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
10 deletions
+22
-10
index.js
...es/base-components/AlarmScrollAssembly/src/demos/index.js
+1
-1
index.js
packages/base-components/AlarmScrollAssembly/src/index.js
+7
-6
index.less
packages/base-components/AlarmScrollAssembly/src/index.less
+14
-3
No files found.
packages/base-components/AlarmScrollAssembly/src/demos/index.js
View file @
16c6a2ff
...
@@ -5,5 +5,5 @@ window.globalConfig = {
...
@@ -5,5 +5,5 @@ window.globalConfig = {
userInfo
:
{
OID
:
1
},
userInfo
:
{
OID
:
1
},
};
};
export
default
()
=>
{
export
default
()
=>
{
return
<
AlarmScrollAssembly
deviceType
=
{
'二供泵房,二供机组'
}
/>; /
/
最小宽度
930
px
return
<
AlarmScrollAssembly
deviceType
=
{
'二供泵房,二供机组'
}
prefix
=
{
'报警信息:'
}
/>; /
/
最小宽度
930
px
};
};
packages/base-components/AlarmScrollAssembly/src/index.js
View file @
16c6a2ff
...
@@ -95,13 +95,14 @@ const AlarmScrollAssembly = (props) => {
...
@@ -95,13 +95,14 @@ const AlarmScrollAssembly = (props) => {
getData
();
getData
();
},
[]);
},
[]);
return
(
return
(
<>
<
div
className
=
{
styles
.
alarmScrollAssemblyWrapper
}
>
{
realTimeDataList
&&
realTimeDataList
.
length
?
<>
{
realTimeDataList
&&
realTimeDataList
.
length
?
<
div
className
=
{
styles
.
content
}
style
=
{{
display
:
'flex'
}}
>
{
{
props
.
prefix
?
<
span
>
{
props
.
prefix
}
<
/span> : '
'
props
.
prefix
?
<
span
style
=
{{...
props
.
style
,
flex
:
'none'
,
marginRight
:
10
}}
>
{
props
.
prefix
}
<
/span> : '
'
}
}
<
div
<
div
className
=
{
classnames
(
styles
.
alarScrollAssembly
,
(
realTimeDataList
?.
length
>
1000
?
styles
.
moreThan1000
:
styles
.
lessThan1000
))}
className
=
{
classnames
(
styles
.
alar
m
ScrollAssembly
,
(
realTimeDataList
?.
length
>
1000
?
styles
.
moreThan1000
:
styles
.
lessThan1000
))}
id
=
{
'alarmListDiv'
}
>
id
=
{
'alarmListDiv'
}
>
<
Swiper
<
Swiper
slidesPerView
=
{
1
}
slidesPerView
=
{
1
}
...
@@ -152,8 +153,8 @@ const AlarmScrollAssembly = (props) => {
...
@@ -152,8 +153,8 @@ const AlarmScrollAssembly = (props) => {
<
/Modal
>
<
/Modal
>
)}
)}
<
/div
>
<
/div
>
<
/> : ''
}
<
/
div
> : ''
}
<
/
>
<
/
div
>
);
);
};
};
AlarmScrollAssembly
.
defaultProps
=
{
AlarmScrollAssembly
.
defaultProps
=
{
...
...
packages/base-components/AlarmScrollAssembly/src/index.less
View file @
16c6a2ff
.alarScrollAssembly {
.alarmScrollAssemblyWrapper {
width: 100%;
.content {
display: flex;
align-items: center;
.alarmScrollAssembly {
&.moreThan1000 {
&.moreThan1000 {
:global {
:global {
.swiper-container {
.swiper-container {
...
@@ -35,6 +42,7 @@
...
@@ -35,6 +42,7 @@
}
}
}
}
}
}
&.lessThan1000 {
&.lessThan1000 {
:global {
:global {
.swiper-container {
.swiper-container {
...
@@ -71,13 +79,14 @@
...
@@ -71,13 +79,14 @@
}
}
}
}
}
}
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
gap: 8px;
gap: 8px;
width: 100%;
//
width: 100%;
min-width: 930px;
min-width: 930px;
height: 42px;
height: 42px;
overflow-y: scroll;
//
overflow-y: scroll;
.warningWrapper {
.warningWrapper {
display: flex;
display: flex;
...
@@ -170,4 +179,6 @@
...
@@ -170,4 +179,6 @@
white-space: nowrap;
white-space: nowrap;
text-overflow: ellipsis;
text-overflow: ellipsis;
}
}
}
}
}
}
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