<nz-tabset *ngIf="ncSrv.routeContents.length > 0" [nzSelectedIndex]="ncSrv.activeRouteContentIndex" [nzTabBarGutter]="16"
  [nzAnimated]="false">
  <nz-tab *ngFor="let routeContent of ncSrv.routeContents; let cacheIndex = index;" [nzTitle]="tabTitle"
    (nzClick)="_navigateTo(routeContent.route)">
    <ng-template #tabTitle>
      <div class="_nc-tab-content" (contextmenu)="_openMenu($event, menu)">
        <i *ngIf="cacheIndex === ncSrv.activeRouteContentIndex && !routeContent.instance?.title && !routeContent.data?.title && !routeContent.data?.name"
          nz-icon [nzType]="'loading'"></i>
        <span [title]="routeContent.instance?.title || routeContent.data?.title || routeContent.data?.name || '加载中...'">{{
            routeContent.instance?.title || routeContent.data?.title || routeContent.data?.name || '加载中...' }}</span>
      </div>
      <div class="_nc-tab-actions">
        <i nz-icon [nzType]="'close'" [title]="'关闭'" (click)="ncSrv.closeRoute(routeContent.route)"></i>
      </div>
    </ng-template>
    <nz-dropdown-menu #menu="nzDropdownMenu">
      <ul nz-menu nzInDropDown (nzClick)="_closeMenu()">
        <li nz-menu-item (click)="ncSrv.closeRoute(routeContent.route)">关闭当前</li>
        <li nz-menu-item (click)="ncSrv.closeOtherRoute(routeContent.route)">关闭其它</li>
        <li nz-menu-item (click)="ncSrv.clearRoute()">关闭所有</li>
      </ul>
    </nz-dropdown-menu>
  </nz-tab>
</nz-tabset>