fengxiang
2018-07-11 12b04f145bae740e1971036b1e2dfc1bc224d17b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<div class="content__title">
  <h1>Read & Write zip file,
    <a href="//ng-alain.com/components/zip" target="_blank">Document</a>
  </h1>
</div>
<nz-card nzTitle="解压">
  <button nz-button (click)="url()">Via Url</button>
  <input type="file" (change)="change($event)" multiple="false" class="ml-sm" />
  <ol>
    <li *ngFor="let i of list">{{i | json}}</li>
  </ol>
</nz-card>
<nz-card nzTitle="压缩" *ngIf="instance">
  <button nz-button (click)="data.push({})" [nzType]="'primary'">new</button>
  <button nz-button (click)="download()" class="ml-sm">download</button>
  <nz-table [nzData]="data" [nzFrontPagination]="false" [nzShowPagination]="false" class="mt-sm">
    <thead>
      <tr>
        <th>
          <span>path</span>
        </th>
        <th>
          <span>url</span>
        </th>
      </tr>
    </thead>
    <tbody>
      <tr *ngFor="let i of data; let index = index">
        <td>
          <input nz-input [(ngModel)]="i.path" name="path{{index}}">
        </td>
        <td>
          <input nz-input [(ngModel)]="i.url" name="url{{index}}">
        </td>
      </tr>
    </tbody>
  </nz-table>
</nz-card>