From 010dbbd91fbb7e075bff3b7232899ce01a162f0a Mon Sep 17 00:00:00 2001 From: buqiyuan <1743369777@qq.com> Date: Fri, 15 Jul 2022 16:15:15 +0800 Subject: [PATCH 1/3] fix: tree node css style --- .../components/api-script/api-script.component.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/workbench/browser/src/app/shared/components/api-script/api-script.component.scss b/src/workbench/browser/src/app/shared/components/api-script/api-script.component.scss index e69de29bb..41432d722 100644 --- a/src/workbench/browser/src/app/shared/components/api-script/api-script.component.scss +++ b/src/workbench/browser/src/app/shared/components/api-script/api-script.component.scss @@ -0,0 +1,8 @@ +.eo-api-script { + ::ng-deep .ant-tree-indent { + width: 20px; + } + ::ng-deep .ant-tree-switcher { + // width: 0; + } +} From 23b5d0cb2dd99256a71c2f7b6ef9103e9696a808 Mon Sep 17 00:00:00 2001 From: buqiyuan <1743369777@qq.com> Date: Fri, 15 Jul 2022 16:27:59 +0800 Subject: [PATCH 2/3] fix: tree node css style --- .../api-script/api-script.component.scss | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/workbench/browser/src/app/shared/components/api-script/api-script.component.scss b/src/workbench/browser/src/app/shared/components/api-script/api-script.component.scss index 41432d722..7056b13be 100644 --- a/src/workbench/browser/src/app/shared/components/api-script/api-script.component.scss +++ b/src/workbench/browser/src/app/shared/components/api-script/api-script.component.scss @@ -1,8 +1,24 @@ .eo-api-script { - ::ng-deep .ant-tree-indent { + ::ng-deep .ant-tree-indent { width: 20px; } - ::ng-deep .ant-tree-switcher { - // width: 0; + ::ng-deep .ant-tree-switcher { + width: 0; + } + ::ng-deep .ant-tree-treenode-switcher-open { + .ant-tree-indent { + width: 0; + } + .ant-tree-switcher { + width: 20px; + } + } + ::ng-deep .ant-tree-treenode-switcher-close { + .ant-tree-indent { + width: 0; + } + .ant-tree-switcher { + width: 20px; + } } } From f4c3ac27c003fbe6a04516d6fe80a22fab276dd2 Mon Sep 17 00:00:00 2001 From: buqiyuan <1743369777@qq.com> Date: Fri, 15 Jul 2022 16:51:52 +0800 Subject: [PATCH 3/3] remove pre & after script in api-edit --- .../pages/api/edit/api-edit.component.html | 20 +------------------ .../app/pages/api/edit/api-edit.component.ts | 3 ++- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/workbench/browser/src/app/pages/api/edit/api-edit.component.html b/src/workbench/browser/src/app/pages/api/edit/api-edit.component.html index 585817a3d..f146628f8 100644 --- a/src/workbench/browser/src/app/pages/api/edit/api-edit.component.html +++ b/src/workbench/browser/src/app/pages/api/edit/api-edit.component.html @@ -43,7 +43,7 @@ {{ panel.nzActive ? 'Shrink' : 'Expand' }} - + @@ -86,24 +86,6 @@ - - - Prescript - {{ - apiData.restParams | apiParamsNum - }} - - - - - - Post script - {{ - apiData.restParams | apiParamsNum - }} - - - diff --git a/src/workbench/browser/src/app/pages/api/edit/api-edit.component.ts b/src/workbench/browser/src/app/pages/api/edit/api-edit.component.ts index 06b685964..7acad0ab3 100644 --- a/src/workbench/browser/src/app/pages/api/edit/api-edit.component.ts +++ b/src/workbench/browser/src/app/pages/api/edit/api-edit.component.ts @@ -43,6 +43,7 @@ export class ApiEditComponent implements OnInit, OnDestroy { expandKeys: string[]; REQUEST_METHOD = objectToArray(RequestMethod); REQUEST_PROTOCOL = objectToArray(RequestProtocol); + nzSelectedIndex = 1; private destroy$: Subject = new Subject(); private changeGroupID$: Subject = new Subject(); @@ -117,7 +118,7 @@ export class ApiEditComponent implements OnInit, OnDestroy { if (typeof this.apiData[tableName] !== 'object') { return; } - formData[tableName] = (this.apiData[tableName]||[]).filter((val) => val.name); + formData[tableName] = (this.apiData[tableName] || []).filter((val) => val.name); if (['requestBody', 'responseBody'].includes(tableName)) { if (['xml', 'json'].includes(formData[`${tableName}Type`])) { formData[tableName] = listToTreeHasLevel(formData[tableName]);