微调
This commit is contained in:
@@ -33,14 +33,17 @@
|
||||
v-model="form[0].dipData.ftransValue"
|
||||
style="width: 150px"
|
||||
:disabled="!form[0].dipFlag"
|
||||
onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="120px" label="持续时间(周波)">
|
||||
<el-input
|
||||
type="number"
|
||||
v-model="form[0].dipData.retainTime"
|
||||
@input="handleInputRetainTime"
|
||||
style="width: 150px"
|
||||
:disabled="!form[0].dipFlag"
|
||||
onkeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
@@ -63,9 +66,21 @@ const form: any = computed({
|
||||
})
|
||||
const handleInput = value => {
|
||||
if (value < 0) {
|
||||
ElMessage.warning("设定幅度不能小于0%")
|
||||
props.childForm[0].dipData.ftransValue = 0
|
||||
} else if (value > 200) {
|
||||
props.childForm[0].dipData.ftransValue = 200
|
||||
} else if (value > 140) {
|
||||
ElMessage.warning("设定幅度不能大于140%")
|
||||
props.childForm[0].dipData.ftransValue = 140
|
||||
}
|
||||
}
|
||||
|
||||
const handleInputRetainTime = value => {
|
||||
if (value < 0) {
|
||||
ElMessage.warning("持续时间不能小于0周波")
|
||||
props.childForm[0].dipData.retainTime = 0
|
||||
}else if (value > 300) {
|
||||
ElMessage.warning("持续时间不能大于300周波")
|
||||
props.childForm[0].dipData.retainTime = 300
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user