错误类型错误:
val.slice 不是函数
数据表配置
$.p-dataTable #dt [value]="customers" [(selection)]="chkBoxSelect"
dataKey="customerId" [rows]="10" [paginator]="true"
paginatorPosition="both" [pageLinks]="5" [rowsPerPageOptions]="[5,10,20]"
[globalFilter]="gb" [headerCheckboxToggleAllPages]="false"
[editable]="true" exportFilename="customers" [lazy]="true"
[totalRecords]="totalRecords" onLazyLoad)="loadCustomersByPage($event)"
回调函数
$loadCustomersByPage(event: LazyLoadEvent) {
const parameters = "?page=" + event.first + "&size=" + (event.first + event.rows);
this._cs.findAllActiveCustomerDetailsByPage(parameters).subscribe(
(data: any) => {
this.customers = data;
},
(error) => {
console.log("--error--" + error)
}
);
}