fix(接口测试): 响应切换丢失schema修复
--bug=1047484 --user=白奇 在Schema格式下,修改默认的响应内容,在Json中自动生成失败 https://www.tapd.cn/55049933/s/1591564
This commit is contained in:
parent
b27da7e476
commit
519c5da10f
|
@ -402,11 +402,18 @@
|
|||
const selectedKeys = ref<string[]>([]);
|
||||
|
||||
watchEffect(() => {
|
||||
if (activeResponse.value.body.jsonBody.jsonSchema) {
|
||||
if (
|
||||
activeResponse.value.body.jsonBody.jsonSchema &&
|
||||
(!activeResponse.value.body.jsonBody.jsonSchemaTableData ||
|
||||
activeResponse.value.body.jsonBody.jsonSchemaTableData.length === 0)
|
||||
) {
|
||||
const { result, ids } = parseSchemaToJsonSchemaTableData(activeResponse.value.body.jsonBody.jsonSchema);
|
||||
activeResponse.value.body.jsonBody.jsonSchemaTableData = result;
|
||||
selectedKeys.value = ids;
|
||||
} else {
|
||||
} else if (
|
||||
!activeResponse.value.body.jsonBody.jsonSchemaTableData ||
|
||||
activeResponse.value.body.jsonBody.jsonSchemaTableData.length === 0
|
||||
) {
|
||||
activeResponse.value.body.jsonBody.jsonSchemaTableData = [];
|
||||
selectedKeys.value = [];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue