<page-header [action]="phActionTpl">
  <ng-template #phActionTpl>
    <button (click)="get()" nz-button nzType="primary">刷新</button>
  </ng-template>
</page-header>

<nz-card>
  <nz-table #expandTable [nzData]="menuList" nzTableLayout="fixed" [nzSize]="'small'">
    <thead>
      <tr>
        <th>菜单名称</th>
        <th>菜单代码</th>
        <th>排序号</th>
        <th>图标</th>
        <!-- <th>ACL</th> -->
      </tr>
    </thead>
    <tbody>
      <ng-container *ngFor="let data of expandTable.data">
        <ng-container *ngFor="let item of mapOfExpandedData[data.id]">
          <tr *ngIf="(item.parent && item.parent.expand) || !item.parent">
            <td [nzIndentSize]="item.level! * 20" [nzShowExpand]="!!item.children && item.children.length !=0"
              [(nzExpand)]="item.expand" (nzExpandChange)="collapse(mapOfExpandedData[data.id], item, $event)">
              {{ item.text }}
            </td>
            <td>{{ item.menuCode }}</td>
            <td>{{ item.srtno }}</td>
            <td>{{ item.icon }}</td>
            <!-- <td>
              <a>权限</a>
              <nz-divider nzType="vertical"></nz-divider>
            </td> -->
          </tr>
        </ng-container>
      </ng-container>
    </tbody>
  </nz-table>
</nz-card>
