Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
Project
Project
Details
Activity
Releases
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
海康威视
web-project
Commits
4b0e0076
Commit
4b0e0076
authored
Aug 09, 2024
by
xuke
Browse files
Options
Browse Files
Download
Plain Diff
能源消耗
parents
b9fe630b
cb391db4
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
256 additions
and
109 deletions
+256
-109
common.less
src/assets/css/common.less
+64
-64
directives.js
src/utils/directives.js
+31
-0
ConfigBoilerPage.vue
src/views/SchedulingPage/ConfigBoilerPage.vue
+161
-45
No files found.
src/assets/css/common.less
View file @
4b0e0076
*{
box-sizing:
border-box;
-moz-box-sizing:
border-box; /* Firefox */
-webkit-box-sizing:
border-box; /* Safari */
*
{
box-sizing:
border-box;
-moz-box-sizing:
border-box; /* Firefox */
-webkit-box-sizing:
border-box; /* Safari */
}
.el-pager li{
font-weight: 100;
margin-right: 9px;
border: 1px solid #eee;
border-radius: 3px;
min-width: 28px;
.el-pager li
{
font-weight: 100;
margin-right: 9px;
border: 1px solid #eee;
border-radius: 3px;
min-width: 28px;
}
.el-pager li.active,.el-pager li:hover{
background: #ed4014;
color: white;
.el-pager li.active,
.el-pager li:hover {
background: #ed4014;
color: white;
}
.el-pagination__editor.el-input .el-input__inner{
height: 23px;
.el-pagination__editor.el-input .el-input__inner
{
height: 23px;
}
.animated {
-webkit-animation-duration: 0.5s;
animation-duration: 0.5s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@media (print), (prefers-reduced-motion) {
.animated {
-webkit-animation: unset !important;
animation: unset !important;
-webkit-transition: none !important;
transition: none !important;
}
-webkit-animation-duration: 0.5s;
animation-duration: 0.5s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@media (print), (prefers-reduced-motion) {
.animated {
-webkit-animation: unset !important;
animation: unset !important;
-webkit-transition: none !important;
transition: none !important;
}
@-webkit-keyframes fadeInDown {
from {
opacity: 1;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@-webkit-keyframes fadeInDown {
from {
opacity: 1;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
@keyframes fadeInDown {
from {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.fadeInDown {
-webkit-animation-name: fadeInDown;
animation-name: fadeInDown;
}
@keyframes fadeInDown {
from {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
.ivu-message{
z-index: 999999999 !important;
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.ivu-form-item-content{
text-align: left;
}
\ No newline at end of file
}
.fadeInDown {
-webkit-animation-name: fadeInDown;
animation-name: fadeInDown;
}
.ivu-message {
z-index: 999999999 !important;
}
.ivu-form-item-content {
text-align: left;
}
src/utils/directives.js
0 → 100644
View file @
4b0e0076
//只允许输入整数
export
const
integerOnly
=
{
beforeMount
(
el
)
{
el
.
addEventListener
(
'input'
,
event
=>
{
// 获取输入框的当前值
let
value
=
event
.
target
.
value
;
// 使用正则表达式来匹配非整数字符,替换为空字符串
value
=
value
.
replace
(
/
[^
0-9
]
/g
,
''
);
// 如果值变化了,更新输入框的值
if
(
value
!==
event
.
target
.
value
)
{
event
.
target
.
value
=
value
;
}
});
}
};
// 只允许输入浮点数
export
const
vFloatNumber
=
{
beforeMount
(
el
)
{
el
.
addEventListener
(
'input'
,
(
e
)
=>
{
e
.
target
.
value
=
e
.
target
.
value
.
replace
(
/
[^\d
.
]
/g
,
''
).
replace
(
/^
\.
/g
,
''
).
replace
(
/
\.{2,}
/g
,
'.'
).
replace
(
/^
(\d
+
)\.
/g
,
'$1.'
).
replace
(
'.'
,
'$#$'
).
replace
(
/
\.
/g
,
''
).
replace
(
'$#$'
,
'.'
);
e
.
target
.
value
=
e
.
target
.
value
.
replace
(
/^
(\d
+
)\.
/g
,
'$1.'
).
replace
(
/^0+
(?=[
1-9
])
/
,
''
);
if
(
e
.
target
.
value
.
split
(
'.'
).
length
>
2
)
{
e
.
target
.
value
=
e
.
target
.
value
.
replace
(
'.'
,
'$#$'
).
split
(
'.'
).
map
(
part
=>
part
.
replace
(
/
\d
/g
,
''
)).
join
(
'.'
).
replace
(
'$#$'
,
'.'
).
substring
(
0
,
e
.
target
.
value
.
length
-
1
);
}
});
}
};
\ No newline at end of file
src/views/SchedulingPage/ConfigBoilerPage.vue
View file @
4b0e0076
This diff is collapsed.
Click to expand it.
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