通用组件-刷新
This commit is contained in:
@@ -1,40 +1,51 @@
|
||||
<nz-table nzTableLayout="fixed"
|
||||
[nzData]="dataList.list"
|
||||
[nzTotal]="dataList.total"
|
||||
[(nzPageIndex)]="dataList.pageNum"
|
||||
[nzPageSize]="dataList.pageSize"
|
||||
(nzPageIndexChange)="getData()"
|
||||
nzFrontPagination="false">
|
||||
<thead>
|
||||
<tr>
|
||||
<ng-container *ngFor="let headData of data">
|
||||
<th *ngIf="headData.show">
|
||||
{{headData.fieldName}}
|
||||
</th>
|
||||
</ng-container>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let t of dataList.list">
|
||||
<ng-container *ngFor="let headData of data">
|
||||
<td *ngIf="headData.show">
|
||||
<ng-template [ngIf]="!headData.isActionColumns">
|
||||
{{t[headData.fieldValue]}}
|
||||
</ng-template>
|
||||
<ng-container *ngIf="headData.isActionColumns">
|
||||
<a *ngFor="let action of headData.action; let i = index" (mouseenter)="action.hover(t)"
|
||||
(mouseout)="null" (click)="action.click(t)"
|
||||
[ngStyle]="{'color':action.color,'font-size':action.fontSize}">
|
||||
{{action.name}}
|
||||
<ng-template [ngIf]="i!=headData.action.length-1">
|
||||
<nz-divider nzType="vertical"></nz-divider>
|
||||
</ng-template>
|
||||
</a>
|
||||
</ng-container>
|
||||
</td>
|
||||
</ng-container>
|
||||
<nz-card nzSize="small" [nzExtra]="refresh" [nzTitle]="title" [nzLoading]="loading">
|
||||
<nz-table nzTableLayout="fixed"
|
||||
[nzData]="dataList.list"
|
||||
[nzTotal]="dataList.total"
|
||||
[(nzPageIndex)]="dataList.pageNum"
|
||||
[nzPageSize]="dataList.pageSize"
|
||||
(nzPageIndexChange)="getData()"
|
||||
nzFrontPagination="false">
|
||||
<thead>
|
||||
<tr>
|
||||
<ng-container *ngFor="let headData of data">
|
||||
<th *ngIf="headData.show">
|
||||
{{headData.fieldName}}
|
||||
</th>
|
||||
</ng-container>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let t of dataList.list">
|
||||
<ng-container *ngFor="let headData of data">
|
||||
<td *ngIf="headData.show"
|
||||
nz-typography
|
||||
nzEllipsis
|
||||
nzEllipsisRows="1"
|
||||
[nzTooltipTitle]="headData.fieldName+' : '+t[headData.fieldValue]"
|
||||
nzTooltipPlacement="right"
|
||||
nz-tooltip>
|
||||
<ng-template [ngIf]="!headData.isActionColumns">
|
||||
{{t[headData.fieldValue]}}
|
||||
</ng-template>
|
||||
<ng-container *ngIf="headData.isActionColumns">
|
||||
<a *ngFor="let action of headData.action; let i = index" (mouseenter)="action.hover(t)"
|
||||
(mouseout)="null" (click)="action.click(t)"
|
||||
[ngStyle]="{'color':action.color,'font-size':action.fontSize}">
|
||||
{{action.name}}
|
||||
<ng-template [ngIf]="i!=headData.action.length-1">
|
||||
<nz-divider nzType="vertical"></nz-divider>
|
||||
</ng-template>
|
||||
</a>
|
||||
</ng-container>
|
||||
</td>
|
||||
</ng-container>
|
||||
</tr>
|
||||
</tbody>
|
||||
</nz-table>
|
||||
</nz-card>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</nz-table>
|
||||
<ng-template #refresh>
|
||||
<i nz-icon nzType="reload" nzTheme="outline" (click)="getData()"></i>
|
||||
</ng-template>
|
||||
|
||||
Reference in New Issue
Block a user