fix(接口测试): 接口定义文档的高级设置一键展开功能增加对jsonschema节点的展开
--bug=1019065 --user=宋天阳 【接口测试】接口定义文档-json请求体/响应体的一键展开/收起按钮没有生效【+github#19202】 https://www.tapd.cn/55049933/s/1282310
This commit is contained in:
parent
f3ac01a948
commit
31a76fb2a5
|
@ -67,8 +67,7 @@
|
|||
import {getUUID} from "metersphere-frontend/src/utils";
|
||||
import {TYPE, TYPE_NAME, TYPES} from "@/business/commons/json-schema/schema/editor/type/type";
|
||||
import MsMock from "@/business/commons/json-schema/schema/editor/mock/MockComplete";
|
||||
import JsonAdvancedSetting
|
||||
from "@/business/definition/components/document/components/plugin/JsonAdvancedSetting";
|
||||
import JsonAdvancedSetting from "@/business/definition/components/document/components/plugin/JsonAdvancedSetting";
|
||||
|
||||
export default {
|
||||
name: 'JsonSchemaPanel',
|
||||
|
@ -169,19 +168,33 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
if (this.pickValue) {
|
||||
if (this.pickValue.hidden === undefined) {
|
||||
this.hidden = this.root ? false : true;
|
||||
} else {
|
||||
this.hidden = this.root ? false : this.pickValue.hidden;
|
||||
}
|
||||
if (this.expandAllParams) {
|
||||
this.hidden = false;
|
||||
} else {
|
||||
this.hidden = true;
|
||||
if (this.pickValue) {
|
||||
if (this.pickValue.hidden === undefined) {
|
||||
this.hidden = this.root ? false : true;
|
||||
} else {
|
||||
this.hidden = this.root ? false : this.pickValue.hidden;
|
||||
}
|
||||
} else {
|
||||
this.hidden = true;
|
||||
}
|
||||
}
|
||||
this.collapseStatus = this.expandAllParams;
|
||||
},
|
||||
watch: {
|
||||
expandAllParams() {
|
||||
this.collapseStatus = this.expandAllParams;
|
||||
if (this.expandAllParams) {
|
||||
this.hidden = false;
|
||||
} else {
|
||||
if (!this.root) {
|
||||
this.hidden = true;
|
||||
}
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.collapseStatus = this.expandAllParams;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
Loading…
Reference in New Issue