Commit 4b0e0076 authored by xuke's avatar xuke

能源消耗

parents b9fe630b cb391db4
*{ * {
box-sizing:border-box; box-sizing: border-box;
-moz-box-sizing:border-box; /* Firefox */ -moz-box-sizing: border-box; /* Firefox */
-webkit-box-sizing:border-box; /* Safari */ -webkit-box-sizing: border-box; /* Safari */
} }
.el-pager li{ .el-pager li {
font-weight: 100; font-weight: 100;
margin-right: 9px; margin-right: 9px;
border: 1px solid #eee; border: 1px solid #eee;
border-radius: 3px; border-radius: 3px;
min-width: 28px; min-width: 28px;
} }
.el-pager li.active,.el-pager li:hover{ .el-pager li.active,
.el-pager li:hover {
background: #ed4014; background: #ed4014;
color: white; color: white;
} }
.el-pagination__editor.el-input .el-input__inner{ .el-pagination__editor.el-input .el-input__inner {
height: 23px; height: 23px;
} }
.animated { .animated {
-webkit-animation-duration: 0.5s; -webkit-animation-duration: 0.5s;
animation-duration: 0.5s; animation-duration: 0.5s;
-webkit-animation-fill-mode: both; -webkit-animation-fill-mode: both;
animation-fill-mode: both; animation-fill-mode: both;
} }
@media (print), (prefers-reduced-motion) { @media (print), (prefers-reduced-motion) {
.animated { .animated {
-webkit-animation: unset !important; -webkit-animation: unset !important;
animation: unset !important; animation: unset !important;
-webkit-transition: none !important; -webkit-transition: none !important;
transition: none !important; transition: none !important;
} }
} }
@-webkit-keyframes fadeInDown { @-webkit-keyframes fadeInDown {
from { from {
opacity: 1; opacity: 1;
-webkit-transform: translate3d(0, -100%, 0); -webkit-transform: translate3d(0, -100%, 0);
...@@ -47,9 +47,9 @@ ...@@ -47,9 +47,9 @@
-webkit-transform: translate3d(0, 0, 0); -webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
} }
} }
@keyframes fadeInDown { @keyframes fadeInDown {
from { from {
opacity: 0; opacity: 0;
-webkit-transform: translate3d(0, -100%, 0); -webkit-transform: translate3d(0, -100%, 0);
...@@ -61,15 +61,15 @@ ...@@ -61,15 +61,15 @@
-webkit-transform: translate3d(0, 0, 0); -webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
} }
} }
.fadeInDown { .fadeInDown {
-webkit-animation-name: fadeInDown; -webkit-animation-name: fadeInDown;
animation-name: fadeInDown; animation-name: fadeInDown;
} }
.ivu-message{ .ivu-message {
z-index: 999999999 !important; z-index: 999999999 !important;
} }
.ivu-form-item-content{ .ivu-form-item-content {
text-align: left; text-align: left;
} }
\ No newline at end of file
//只允许输入整数
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment