fix(接口测试): case的schema 自动切换 json 问题修复

This commit is contained in:
baiqi 2024-07-31 18:28:59 +08:00 committed by 刘瑞斌
parent 076b6c3ef2
commit 00b0df2c33
1 changed files with 13 additions and 7 deletions

View File

@ -272,14 +272,20 @@
}
);
watch(
() => [props.hideJsonSchema, props.isCase],
() => {
if (props.hideJsonSchema) {
innerParams.value.jsonBody.enableJsonSchema = false;
return;
}
if (props.isCase) {
innerParams.value.jsonBody.enableJsonSchema = false;
}
}
);
watchEffect(() => {
if (props.hideJsonSchema) {
innerParams.value.jsonBody.enableJsonSchema = false;
return;
}
if (props.isCase) {
innerParams.value.jsonBody.enableJsonSchema = false;
}
if (
innerParams.value.jsonBody.jsonSchema &&
(!innerParams.value.jsonBody.jsonSchemaTableData || innerParams.value.jsonBody.jsonSchemaTableData.length === 0)