fix(接口测试): 接口测试 bugFix
This commit is contained in:
parent
4abe7042e9
commit
ee53476ace
|
@ -98,6 +98,7 @@
|
||||||
:precision="0"
|
:precision="0"
|
||||||
size="medium"
|
size="medium"
|
||||||
:disabled="props.disabled"
|
:disabled="props.disabled"
|
||||||
|
model-event="input"
|
||||||
@change="emitChange('minLengthInput')"
|
@change="emitChange('minLengthInput')"
|
||||||
/>
|
/>
|
||||||
<div v-else class="ms-form-table-td-text">-</div>
|
<div v-else class="ms-form-table-td-text">-</div>
|
||||||
|
@ -111,6 +112,7 @@
|
||||||
:precision="0"
|
:precision="0"
|
||||||
size="medium"
|
size="medium"
|
||||||
:disabled="props.disabled"
|
:disabled="props.disabled"
|
||||||
|
model-event="input"
|
||||||
@change="emitChange('maxLengthInput')"
|
@change="emitChange('maxLengthInput')"
|
||||||
/>
|
/>
|
||||||
<div v-else class="ms-form-table-td-text">-</div>
|
<div v-else class="ms-form-table-td-text">-</div>
|
||||||
|
@ -122,6 +124,7 @@
|
||||||
class="ms-form-table-input-number"
|
class="ms-form-table-input-number"
|
||||||
size="medium"
|
size="medium"
|
||||||
:disabled="props.disabled"
|
:disabled="props.disabled"
|
||||||
|
model-event="input"
|
||||||
@change="emitChange('minimumInput')"
|
@change="emitChange('minimumInput')"
|
||||||
/>
|
/>
|
||||||
<a-input-number
|
<a-input-number
|
||||||
|
@ -132,6 +135,7 @@
|
||||||
:step="1"
|
:step="1"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
:disabled="props.disabled"
|
:disabled="props.disabled"
|
||||||
|
model-event="input"
|
||||||
@change="emitChange('minimumInput')"
|
@change="emitChange('minimumInput')"
|
||||||
/>
|
/>
|
||||||
<div v-else class="ms-form-table-td-text">-</div>
|
<div v-else class="ms-form-table-td-text">-</div>
|
||||||
|
@ -143,6 +147,7 @@
|
||||||
class="ms-form-table-input-number"
|
class="ms-form-table-input-number"
|
||||||
size="medium"
|
size="medium"
|
||||||
:disabled="props.disabled"
|
:disabled="props.disabled"
|
||||||
|
model-event="input"
|
||||||
@change="emitChange('maximumInput')"
|
@change="emitChange('maximumInput')"
|
||||||
/>
|
/>
|
||||||
<a-input-number
|
<a-input-number
|
||||||
|
@ -153,6 +158,7 @@
|
||||||
:step="1"
|
:step="1"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
:disabled="props.disabled"
|
:disabled="props.disabled"
|
||||||
|
model-event="input"
|
||||||
@change="emitChange('maximumInput')"
|
@change="emitChange('maximumInput')"
|
||||||
/>
|
/>
|
||||||
<div v-else class="ms-form-table-td-text">-</div>
|
<div v-else class="ms-form-table-td-text">-</div>
|
||||||
|
@ -167,6 +173,7 @@
|
||||||
:step="1"
|
:step="1"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
:disabled="props.disabled"
|
:disabled="props.disabled"
|
||||||
|
model-event="input"
|
||||||
@change="emitChange('minItemsInput')"
|
@change="emitChange('minItemsInput')"
|
||||||
/>
|
/>
|
||||||
<div v-else class="ms-form-table-td-text">-</div>
|
<div v-else class="ms-form-table-td-text">-</div>
|
||||||
|
@ -181,6 +188,7 @@
|
||||||
:step="1"
|
:step="1"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
:disabled="props.disabled"
|
:disabled="props.disabled"
|
||||||
|
model-event="input"
|
||||||
@change="emitChange('maxItemsInput')"
|
@change="emitChange('maxItemsInput')"
|
||||||
/>
|
/>
|
||||||
<div v-else class="ms-form-table-td-text">-</div>
|
<div v-else class="ms-form-table-td-text">-</div>
|
||||||
|
@ -192,6 +200,7 @@
|
||||||
class="ms-form-table-input-number"
|
class="ms-form-table-input-number"
|
||||||
size="medium"
|
size="medium"
|
||||||
:disabled="props.disabled"
|
:disabled="props.disabled"
|
||||||
|
model-event="input"
|
||||||
@change="emitChange('defaultValueInput')"
|
@change="emitChange('defaultValueInput')"
|
||||||
/>
|
/>
|
||||||
<a-input-number
|
<a-input-number
|
||||||
|
@ -202,6 +211,7 @@
|
||||||
:step="1"
|
:step="1"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
:disabled="props.disabled"
|
:disabled="props.disabled"
|
||||||
|
model-event="input"
|
||||||
@change="emitChange('defaultValueInput')"
|
@change="emitChange('defaultValueInput')"
|
||||||
/>
|
/>
|
||||||
<a-select
|
<a-select
|
||||||
|
@ -367,6 +377,7 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
|
model-event="input"
|
||||||
@change="handleSettingFormChange"
|
@change="handleSettingFormChange"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
@ -377,6 +388,7 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
|
model-event="input"
|
||||||
@change="handleSettingFormChange"
|
@change="handleSettingFormChange"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
@ -389,12 +401,14 @@
|
||||||
mode="button"
|
mode="button"
|
||||||
:step="1"
|
:step="1"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
|
model-event="input"
|
||||||
@change="handleSettingFormChange"
|
@change="handleSettingFormChange"
|
||||||
/>
|
/>
|
||||||
<a-input-number
|
<a-input-number
|
||||||
v-else
|
v-else
|
||||||
v-model:model-value="activeRecord.minimum"
|
v-model:model-value="activeRecord.minimum"
|
||||||
mode="button"
|
mode="button"
|
||||||
|
model-event="input"
|
||||||
@change="handleSettingFormChange"
|
@change="handleSettingFormChange"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
@ -405,12 +419,14 @@
|
||||||
mode="button"
|
mode="button"
|
||||||
:step="1"
|
:step="1"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
|
model-event="input"
|
||||||
@change="handleSettingFormChange"
|
@change="handleSettingFormChange"
|
||||||
/>
|
/>
|
||||||
<a-input-number
|
<a-input-number
|
||||||
v-else
|
v-else
|
||||||
v-model:model-value="activeRecord.maximum"
|
v-model:model-value="activeRecord.maximum"
|
||||||
mode="button"
|
mode="button"
|
||||||
|
model-event="input"
|
||||||
@change="handleSettingFormChange"
|
@change="handleSettingFormChange"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
@ -421,6 +437,7 @@
|
||||||
v-model:model-value="activeRecord.defaultValue"
|
v-model:model-value="activeRecord.defaultValue"
|
||||||
mode="button"
|
mode="button"
|
||||||
:placeholder="t('common.pleaseInput')"
|
:placeholder="t('common.pleaseInput')"
|
||||||
|
model-event="input"
|
||||||
@change="handleSettingFormChange"
|
@change="handleSettingFormChange"
|
||||||
/>
|
/>
|
||||||
<a-input-number
|
<a-input-number
|
||||||
|
@ -430,6 +447,7 @@
|
||||||
:placeholder="t('common.pleaseInput')"
|
:placeholder="t('common.pleaseInput')"
|
||||||
:step="1"
|
:step="1"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
|
model-event="input"
|
||||||
@change="handleSettingFormChange"
|
@change="handleSettingFormChange"
|
||||||
/>
|
/>
|
||||||
<a-input
|
<a-input
|
||||||
|
@ -476,6 +494,7 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
|
model-event="input"
|
||||||
@change="handleSettingFormChange"
|
@change="handleSettingFormChange"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
@ -486,6 +505,7 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
|
model-event="input"
|
||||||
@change="handleSettingFormChange"
|
@change="handleSettingFormChange"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
|
@ -36,4 +36,6 @@ export interface JsonSchema {
|
||||||
items?: JsonSchemaItem[];
|
items?: JsonSchemaItem[];
|
||||||
required?: string[];
|
required?: string[];
|
||||||
description?: string;
|
description?: string;
|
||||||
|
minItems?: number;
|
||||||
|
maxItems?: number;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,6 +65,8 @@ export function parseTableDataToJsonSchema(
|
||||||
type: 'array',
|
type: 'array',
|
||||||
enable: schemaItem.enable,
|
enable: schemaItem.enable,
|
||||||
items: schemaItem.children.map((child) => parseTableDataToJsonSchema(child, false) as JsonSchemaItem),
|
items: schemaItem.children.map((child) => parseTableDataToJsonSchema(child, false) as JsonSchemaItem),
|
||||||
|
minItems: schemaItem.minItems,
|
||||||
|
maxItems: schemaItem.maxItems,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -205,6 +207,8 @@ export function parseSchemaToJsonSchemaTableData(schema: string | JsonSchema): {
|
||||||
required: false,
|
required: false,
|
||||||
example: '',
|
example: '',
|
||||||
defaultValue: '',
|
defaultValue: '',
|
||||||
|
maxItems: node.maxItems,
|
||||||
|
minItems: node.minItems,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
// 子孙节点
|
// 子孙节点
|
||||||
|
|
|
@ -455,9 +455,6 @@
|
||||||
path: e.path,
|
path: e.path,
|
||||||
fullPath,
|
fullPath,
|
||||||
};
|
};
|
||||||
if (!isSetDefaultKey && e.id === selectedKeys.value[0]) {
|
|
||||||
folderNodeSelect([selectedKeys.value[0]], e);
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
...e,
|
...e,
|
||||||
hideMoreAction: e.id === 'root',
|
hideMoreAction: e.id === 'root',
|
||||||
|
|
|
@ -118,9 +118,9 @@
|
||||||
function setActiveApi(params: RequestParam) {
|
function setActiveApi(params: RequestParam) {
|
||||||
if (params.id === 'all') {
|
if (params.id === 'all') {
|
||||||
// 切换到全部 tab 时需设置为上次激活的 api 节点的模块
|
// 切换到全部 tab 时需设置为上次激活的 api 节点的模块
|
||||||
activeNodeId.value = params.moduleId;
|
|
||||||
} else {
|
|
||||||
activeNodeId.value = params.id;
|
activeNodeId.value = params.id;
|
||||||
|
} else {
|
||||||
|
activeNodeId.value = params.moduleId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,8 +148,6 @@
|
||||||
|
|
||||||
async function refreshModuleTree() {
|
async function refreshModuleTree() {
|
||||||
await moduleTreeRef.value?.refresh();
|
await moduleTreeRef.value?.refresh();
|
||||||
// 涉及到模块树的刷新操作(比如删除),也会刷新回收站的数量
|
|
||||||
selectRecycleCount();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshModuleTreeCount(params: ApiDefinitionGetModuleParams) {
|
function refreshModuleTreeCount(params: ApiDefinitionGetModuleParams) {
|
||||||
|
|
Loading…
Reference in New Issue