输出板设置相关数字输入添加最大最小值限制

This commit is contained in:
fangxiang 2022-04-13 11:07:55 +08:00
parent 1aa47f2b42
commit 680f9305a6
1 changed files with 42 additions and 0 deletions

View File

@ -441,6 +441,8 @@
v-model="system_volume"
:loading="loading"
:disable="loading"
max="100"
min="0"
type="number"
:rules="[
(val) =>
@ -448,6 +450,11 @@
val != undefined &&
val.toString().length > 0) ||
$t('Please type something'),
(val) =>
(parseInt(val) >= 0 && parseInt(val) <= 100) ||
$t('number must between') +
'0 ~ 100' +
$t('CN_BERWEEN_SUFFIX'),
]"
lazy-rules
/>
@ -574,12 +581,19 @@
:loading="loading"
:disable="loading"
type="number"
max="11"
min="0"
:rules="[
(val) =>
(val != null &&
val != undefined &&
val.toString().length > 0) ||
$t('Please type something'),
(val) =>
(parseInt(val) >= 0 && parseInt(val) <= 11) ||
$t('number must between') +
'0 ~ 11' +
$t('CN_BERWEEN_SUFFIX'),
]"
lazy-rules
/>
@ -594,6 +608,8 @@
v-model="output_board_wall_col"
:loading="loading"
:disable="loading"
max="11"
min="0"
type="number"
:rules="[
(val) =>
@ -601,6 +617,11 @@
val != undefined &&
val.toString().length > 0) ||
$t('Please type something'),
(val) =>
(parseInt(val) >= 0 && parseInt(val) <= 11) ||
$t('number must between') +
'0 ~ 11' +
$t('CN_BERWEEN_SUFFIX'),
]"
lazy-rules
/>
@ -629,12 +650,19 @@
:loading="loading"
:disable="loading"
type="number"
max="255"
min="0"
:rules="[
(val) =>
(val != null &&
val != undefined &&
val.toString().length > 0) ||
$t('Please type something'),
(val) =>
(parseInt(val) >= 0 && parseInt(val) <= 255) ||
$t('number must between') +
'0 ~ 255' +
$t('CN_BERWEEN_SUFFIX'),
]"
lazy-rules
/>
@ -649,6 +677,8 @@
v-model="output_board_horizon_blanking"
:loading="loading"
:disable="loading"
max="255"
min="0"
type="number"
:rules="[
(val) =>
@ -656,6 +686,11 @@
val != undefined &&
val.toString().length > 0) ||
$t('Please type something'),
(val) =>
(parseInt(val) >= 0 && parseInt(val) <= 255) ||
$t('number must between') +
'0 ~ 255' +
$t('CN_BERWEEN_SUFFIX'),
]"
lazy-rules
/>
@ -686,12 +721,19 @@
:loading="loading"
:disable="loading"
type="number"
max="100"
min="0"
:rules="[
(val) =>
(val != null &&
val != undefined &&
val.toString().length > 0) ||
$t('Please type something'),
(val) =>
(parseInt(val) >= 0 && parseInt(val) <= 100) ||
$t('number must between') +
'0 ~ 100' +
$t('CN_BERWEEN_SUFFIX'),
]"
lazy-rules
/>