列车限速区间选择5-65

This commit is contained in:
fan 2021-06-28 14:55:18 +08:00
parent 65d84a98a8
commit e6f479379b

View File

@ -17,7 +17,7 @@
<div style="display: flex;align-items: center;">
<el-input v-model="addModel.speedLimit" style="width: 130px;margin-right: 10px;" size="small" />
<span>km/h</span>
<el-tooltip style="margin-left: 10px;" effect="dark" content="值为25-65之间-1为取消限速" placement="top-start">
<el-tooltip style="margin-left: 10px;" effect="dark" content="值为5-65之间-1为取消限速" placement="top-start">
<i class="el-icon-warning" />
</el-tooltip>
</div>
@ -94,10 +94,10 @@ export default {
validateLimit(rule, value, callback) {
const num = Number(value);
if (num) {
if ((num >= 25 && num <= 65) || num === -1) {
if ((num >= 5 && num <= 65) || num === -1) {
callback();
} else {
callback(new Error('限速值应该在25-65之间'));
callback(new Error('限速值应该在5-65之间'));
}
} else {
callback(new Error('请输入数值类型'));