趋势对比联调修改
This commit is contained in:
@@ -52,7 +52,7 @@ export default class TableStore {
|
||||
beforeSearchFun: null,
|
||||
height: '',
|
||||
publicHeight: 0,
|
||||
filename: '',
|
||||
filename: ''
|
||||
})
|
||||
|
||||
constructor(public options: TableStoreParams) {
|
||||
@@ -98,10 +98,14 @@ export default class TableStore {
|
||||
this.table.data = []
|
||||
this.table.total = 0
|
||||
}
|
||||
this.table.copyData = filtration(this.table.data)
|
||||
// 只有当 this.table.data 是数组时才执行 filtration 处理
|
||||
if (Array.isArray(this.table.data)) {
|
||||
this.table.copyData = filtration(this.table.data)
|
||||
}
|
||||
if (Array.isArray(res)) {
|
||||
this.table.data = res
|
||||
}
|
||||
|
||||
if (this.isWebPaging) {
|
||||
this.table.webPagingData = window.XEUtils.chunk(this.table.data, this.table.params.pageSize)
|
||||
this.table.data = this.table.webPagingData[this.table.params.pageNum - 1]
|
||||
@@ -109,7 +113,6 @@ export default class TableStore {
|
||||
|
||||
this.table.loadCallback && this.table.loadCallback()
|
||||
this.table.loading = false
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
this.table.loading = false
|
||||
@@ -145,7 +148,6 @@ export default class TableStore {
|
||||
'selection-change',
|
||||
() => {
|
||||
this.table.selection = data as TableRow[]
|
||||
|
||||
}
|
||||
],
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user