fix(接口测试): 修复场景断言类型选择响应时间点击下调按钮显示相应时间为0提示:格式错误的缺陷

--bug=1013446 --user=王孝刚 【接口测试】场景断言-类型选择响应时间-点击下调按钮显示相应时间为0-提示:格式错误
https://www.tapd.cn/55049933/s/1163541
This commit is contained in:
wxg0103 2022-05-25 13:41:51 +08:00 committed by f2c-ci-robot[bot]
parent 98de930ae6
commit 94c5ddb903
1 changed files with 5 additions and 3 deletions

View File

@ -2,8 +2,10 @@
<div>
<el-row :gutter="10" type="flex" justify="space-between" align="middle">
<el-col>
<el-input :disabled="isReadOnly" :value="value" v-bind="$attrs" step="100" size="small" type="number" @change="change" @input="input" :min="0"
:placeholder="$t('api_test.request.assertions.response_in_time')"/>
<el-input :disabled="isReadOnly" :value="value" v-bind="$attrs" step="100" size="small" type="number"
@change="change" @input="input" :min="0"
:placeholder="$t('api_test.request.assertions.response_in_time')"
onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"/>
</el-col>
<el-col class="assertion-btn">
<el-tooltip :content="$t('test_resource_pool.enable_disable')" placement="top" v-if="edit">
@ -55,7 +57,7 @@ export default {
this.$emit('input', value);
},
validate() {
if (this.value == '' || Number(this.value) <= 0) {
if (this.value === '' || Number(this.value) < 0) {
this.$error(this.$t('commons.formatErr'));
return false;
}