mirror of
https://gitee.com/eolink_admin/postcat.git
synced 2024-12-03 12:18:22 +08:00
Merge branch 'main' of github.com:eolinker/eoapi
This commit is contained in:
commit
4bc79deb47
@ -5,7 +5,8 @@
|
||||
</nz-radio-group>
|
||||
<nz-divider nzType="vertical"></nz-divider>
|
||||
<params-import *ngIf="['formData', 'json', 'xml'].includes(bodyType)" [baseData]="model" [contentType]="bodyType"
|
||||
(baseDataChange)="handleParamsImport($event)" [rootType]="jsonRootType"></params-import>
|
||||
(baseDataChange)="handleParamsImport($event)" (beforeHandleImport)="beforeHandleImport($event)"
|
||||
[rootType]="jsonRootType"></params-import>
|
||||
</div>
|
||||
<div *ngIf="bodyType === 'json'">
|
||||
<p class="fs12 c999 mb5">JSON 根类型:</p>
|
||||
|
@ -94,6 +94,11 @@ export class ApiTestBodyComponent implements OnInit, OnChanges, OnDestroy {
|
||||
this.model = data;
|
||||
this.modelChange.emit(data);
|
||||
}
|
||||
|
||||
beforeHandleImport(result) {
|
||||
this.jsonRootType = Array.isArray(result) ? 'array' : 'object';
|
||||
}
|
||||
|
||||
rawDataChange() {
|
||||
this.rawChange$.next(this.model);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user