fix: 3D 模块数字输入限制

This commit is contained in:
wanganmao
2022-12-10 20:29:17 +08:00
parent c7a835fd9b
commit 51318a887b

View File

@@ -189,7 +189,7 @@
:min="1"
:max="100000"
:value="configTemp.show_time"
@update:value="(val) => configTemp.show_time = Number(val).toFixed(0)"
@update:value="updateShowTime"
:formatter="value => `${value}秒`"
:parser="value => value.replace('秒', '')"
style="width: 80px; border-radius: 4px;"
@@ -219,7 +219,7 @@
<a-input-number
:min="2"
:value="configTemp.disable_lines_same"
@update:value="(val) => configTemp.disable_lines_same = Number(val).toFixed(0)"
@update:value="updateDisableLinesSame"
:formatter="value => `${value}次`"
:parser="value => value.replace('次', '')"
style="width: 80px; border-radius: 4px;"
@@ -449,6 +449,18 @@ export default {
this.onUpdate();
},
// 限制时间 更新
updateShowTime(val) {
if(!val) return;
this.configTemp.show_time = Number(val).toFixed(0);
},
// 连选次数 更新
updateDisableLinesSame(val) {
if(!val) return;
this.configTemp.disable_lines_same = Number(val).toFixed(0);
},
onUpdate() {
this.$emit("update:config", this.configTemp);
this.$emit("changeConfig", this.configTemp);