fix(common-table): 修复table组件无法切换页面
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
<ng-template #table>
|
||||
<ng-content></ng-content>
|
||||
<nz-table (nzPageIndexChange)="getData()"
|
||||
<nz-table (nzPageIndexChange)="getData($event)"
|
||||
[(nzPageIndex)]="dataList.pageNum"
|
||||
[nzData]="dataList.list"
|
||||
[nzLoading]="loading"
|
||||
|
||||
@@ -54,10 +54,10 @@ export class CommonTableComponent<T> implements OnInit, OnChanges {
|
||||
this.getData();
|
||||
}
|
||||
|
||||
getData = () => {
|
||||
getData = (pageNumber?: number) => {
|
||||
this.loading = true;
|
||||
const pageValue = this.dataList.pageNum ? this.dataList.pageNum : 1;
|
||||
const countValue = this.dataList.pageSize ? this.dataList.pageSize : 10
|
||||
const pageValue = pageNumber ? pageNumber : 1;
|
||||
const countValue = this.dataList.pageSize ? this.dataList.pageSize : 10;
|
||||
|
||||
this.request.queryParam.page = pageValue;
|
||||
this.request.queryParam.count = countValue;
|
||||
|
||||
Reference in New Issue
Block a user