Skip to content

Commit

Permalink
fix: [api-group-tree] number key to string
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed May 31, 2022
1 parent 6b78189 commit f5d9e93
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
<nz-tabset
[(nzSelectedIndex)]="selectedIndex"
nzType="editable-card"
nzHideAdd="true"
(nzClose)="closeTab($event)"
(nzSelectChange)="pickTab()"
[nzTabBarExtraContent]="extraTemplate"
>
<nz-tabset [(nzSelectedIndex)]="selectedIndex" nzType="editable-card" nzHideAdd="true" (nzClose)="closeTab($event)"
(nzSelectChange)="pickTab()" [nzTabBarExtraContent]="extraTemplate">
<nz-tab *ngFor="let tab of tabSerive.tabs; let i = index" nzClosable [nzTitle]="titleTemplate">
<ng-template #titleTemplate>
<span class="mr5 method_text_{{ tab.method }}" *ngIf="tab.method">{{ tab.method.slice(0, 4) }}</span>
<span class="mr5 method_text method_text_{{ tab.method }}" *ngIf="tab.method">{{ tab.method }}</span>
<span class="text_omit tab_text"> {{ tab.title }}</span>
</ng-template>
</nz-tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,12 @@ export class ApiTabComponent implements OnInit, OnDestroy {
this.storage.run('apiDataCreate', [{ ...inArg.data }, inArg.data.uuid], (result: StorageHandleResult) => {
if (result.status === StorageHandleStatus.success) {
this.message.success('复制成功');
this.appendOrSwitchTab('edit', { ...inArg.data, ...result.data, key: result.data.uuid });
this.appendOrSwitchTab('edit', {
...inArg.data,
...result.data,
title: result.data.name,
key: result.data.uuid + '',
});
this.messageService.send({ type: `copyApiSuccess`, data: result.data });
} else {
this.message.success('失败');
Expand Down

0 comments on commit f5d9e93

Please sign in to comment.