fix(接口测试): 修复生成测试数据时,最大最小值限制没有效果的缺陷
--bug=1030736 --user=王孝刚 【接口测试】github#26795,接口定义使用”生成测试数据“功能时,最大值最小值的限制没有效果 https://www.tapd.cn/55049933/s/1417289
This commit is contained in:
parent
a20ae21e31
commit
0483653abe
|
@ -62,6 +62,7 @@
|
|||
</el-col>
|
||||
<el-col v-if="showColumns('MIX_LENGTH')" class="item kv-select ms-col-name" style="width: 150px; padding: 0 5px">
|
||||
<el-input-number
|
||||
v-if="pickValue.type !== 'integer'"
|
||||
:min="0"
|
||||
:controls="false"
|
||||
v-model="pickValue.minLength"
|
||||
|
@ -75,10 +76,26 @@
|
|||
pickValue.type === 'null'
|
||||
"
|
||||
style="width: 140px" />
|
||||
<el-input-number
|
||||
v-else
|
||||
:min="0"
|
||||
:controls="false"
|
||||
v-model="pickValue.minimum"
|
||||
:placeholder="$t('schema.minimum')"
|
||||
size="small"
|
||||
:disabled="
|
||||
disabled ||
|
||||
pickValue.type === 'object' ||
|
||||
pickKey === 'root' ||
|
||||
pickValue.type === 'array' ||
|
||||
pickValue.type === 'null'
|
||||
"
|
||||
style="width: 140px" />
|
||||
</el-col>
|
||||
|
||||
<el-col v-if="showColumns('MAX_LENGTH')" class="item kv-select ms-col-name" style="width: 150px; padding: 0 5px">
|
||||
<el-input-number
|
||||
v-if="pickValue.type !== 'integer'"
|
||||
:min="0"
|
||||
:controls="false"
|
||||
v-model="pickValue.maxLength"
|
||||
|
@ -92,6 +109,21 @@
|
|||
pickValue.type === 'null'
|
||||
"
|
||||
style="width: 140px" />
|
||||
<el-input-number
|
||||
v-else
|
||||
:min="0"
|
||||
:controls="false"
|
||||
v-model="pickValue.maximum"
|
||||
:placeholder="$t('schema.maximum')"
|
||||
size="small"
|
||||
:disabled="
|
||||
disabled ||
|
||||
pickValue.type === 'object' ||
|
||||
pickKey === 'root' ||
|
||||
pickValue.type === 'array' ||
|
||||
pickValue.type === 'null'
|
||||
"
|
||||
style="width: 140px" />
|
||||
</el-col>
|
||||
|
||||
<el-col v-if="showColumns('DEFAULT')" class="item kv-select ms-col-name" style="min-width: 200px; padding: 0 5px">
|
||||
|
@ -290,6 +322,7 @@ import MsDialogFooter from 'metersphere-frontend/src/components/MsDialogFooter';
|
|||
import { getUUID } from 'metersphere-frontend/src/utils';
|
||||
import CustomInput from '../custom-input/index';
|
||||
import CustomTextarea from '../custom-textarea/index';
|
||||
import {pick} from "mockjs/src/mock/random/helper";
|
||||
|
||||
export default {
|
||||
name: 'JsonSchemaEditor',
|
||||
|
@ -435,6 +468,7 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
pick,
|
||||
showColumns(columns) {
|
||||
if (!this.paramColumns) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue