fix(接口测试): 接口定义文档的高级设置一键展开功能增加对jsonschema节点的展开
--bug=1019065 --user=宋天阳 【接口测试】接口定义文档-json请求体/响应体的一键展开/收起按钮没有生效【+github#19202】 https://www.tapd.cn/55049933/s/1282310
This commit is contained in:
parent
2bb83c561b
commit
0a6b269951
|
@ -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,6 +168,9 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
if (this.expandAllParams) {
|
||||
this.hidden = false;
|
||||
} else {
|
||||
if (this.pickValue) {
|
||||
if (this.pickValue.hidden === undefined) {
|
||||
this.hidden = this.root ? false : true;
|
||||
|
@ -178,10 +180,21 @@ export default {
|
|||
} else {
|
||||
this.hidden = true;
|
||||
}
|
||||
}
|
||||
this.collapseStatus = this.expandAllParams;
|
||||
},
|
||||
watch: {
|
||||
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