mirror of
https://gitee.com/eolink_admin/postcat.git
synced 2024-12-04 20:58:01 +08:00
remove pre & after script in api-edit
This commit is contained in:
parent
a0387414ee
commit
f4c3ac27c0
@ -43,7 +43,7 @@
|
||||
<span i18n>{{ panel.nzActive ? 'Shrink' : 'Expand' }}</span>
|
||||
<span class="iconfont icon-chevron-{{ panel.nzActive ? 'up' : 'down' }}"></span>
|
||||
</ng-template>
|
||||
<nz-tabset [nzAnimated]="false" [nzSelectedIndex]="1" class="mt10">
|
||||
<nz-tabset [nzAnimated]="false" [(nzSelectedIndex)]="nzSelectedIndex" class="mt10">
|
||||
<!-- Request Headers -->
|
||||
<nz-tab [nzTitle]="headerTitleTmp" [nzForceRender]="true">
|
||||
<ng-template #headerTitleTmp>
|
||||
@ -86,24 +86,6 @@
|
||||
</ng-template>
|
||||
<eo-api-edit-rest class="eo_theme_iblock bbd bld brd" [model]="apiData.restParams"></eo-api-edit-rest>
|
||||
</nz-tab>
|
||||
<nz-tab [nzTitle]="preScriptTitleTmp" [nzForceRender]="true">
|
||||
<ng-template #preScriptTitleTmp>
|
||||
Prescript
|
||||
<span class="eo-tab-icon" *ngIf="bindGetApiParamNum(apiData.restParams)">{{
|
||||
apiData.restParams | apiParamsNum
|
||||
}}</span>
|
||||
</ng-template>
|
||||
<eo-api-script class="eo_theme_iblock bbd"></eo-api-script>
|
||||
</nz-tab>
|
||||
<nz-tab [nzTitle]="suffixScriptTitleTmp" [nzForceRender]="true">
|
||||
<ng-template #suffixScriptTitleTmp>
|
||||
Post script
|
||||
<span class="eo-tab-icon" *ngIf="bindGetApiParamNum(apiData.restParams)">{{
|
||||
apiData.restParams | apiParamsNum
|
||||
}}</span>
|
||||
</ng-template>
|
||||
<eo-api-script class="eo_theme_iblock bbd"></eo-api-script>
|
||||
</nz-tab>
|
||||
</nz-tabset>
|
||||
</nz-collapse-panel>
|
||||
</nz-collapse>
|
||||
|
@ -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<void> = new Subject<void>();
|
||||
private changeGroupID$: Subject<string | number> = 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]);
|
||||
|
Loading…
Reference in New Issue
Block a user