<div>

  <p>
    <button nz-button nzType="primary" (click)="load()">刷新</button>
    <nz-divider nzType="vertical"></nz-divider>
    <button nz-button nzType="primary" (click)="upper()">上一级</button>
    {{path}}
  </p>

  <nz-table nzSize="small" [nzData]="files">
    <thead>
    <tr>
      <th [nzShowCheckbox]="true"></th>
      <th>名称</th>
      <th>体积</th>
      <th>更新时间</th>
      <th></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let data of files; let i=index" (click)="onItemClick(data)" (dblclick)="onItemDoubleClick(data)">
      <td [nzChecked]="select == data.name"
          (nzCheckedChange)="onItemChecked(data.name, $event)"
      ></td>
      <td>
        <i nz-icon nzType="folder" *ngIf="data.folder"></i>
        {{ data.name }}
      </td>
      <td>{{ data.size }}</td>
      <td [title]="data.time">{{data.time}}</td>
      <td>
        <a nz-popconfirm nzPopconfirmTitle="确定删除？" (nzOnConfirm)="remove(data, i)">删除</a>
        <nz-divider nzType="vertical"></nz-divider>
        <a (click)="rename(data)">重命名</a>
      </td>
    </tr>
    </tbody>
  </nz-table>

  <nz-upload nz-button [nzAction]="url+path" nzMultiple (nzChange)="load()">上传</nz-upload>
</div>

<div *nzModalFooter>
  <button nz-button nzType="default" (click)="cancel()">取 消</button>
  <button nz-button nzType="primary" (click)="ok()">确 定</button>
</div>
