this.table.
This commit is contained in:
@@ -14,6 +14,7 @@ interface TableStoreParams {
|
||||
publicHeight?: number
|
||||
resetCallback?: () => void
|
||||
loadCallback?: () => void
|
||||
beforeSearchFun?: () => void
|
||||
}
|
||||
|
||||
export default class TableStore {
|
||||
@@ -37,6 +38,7 @@ export default class TableStore {
|
||||
column: [],
|
||||
loadCallback: null,
|
||||
resetCallback: null,
|
||||
beforeSearchFun: null,
|
||||
height: mainHeight(20 + (this.showPage ? 58 : 0)).height as string,
|
||||
publicHeight: 0
|
||||
})
|
||||
@@ -51,6 +53,7 @@ export default class TableStore {
|
||||
this.table.publicHeight = options.publicHeight || 0
|
||||
this.table.resetCallback = options.resetCallback || null
|
||||
this.table.loadCallback = options.loadCallback || null
|
||||
this.table.beforeSearchFun = options.beforeSearchFun || null
|
||||
Object.assign(this.table.params, options.params)
|
||||
}
|
||||
|
||||
@@ -91,6 +94,7 @@ export default class TableStore {
|
||||
[
|
||||
'search',
|
||||
() => {
|
||||
this.table.beforeSearchFun && this.table.beforeSearchFun()
|
||||
this.table.params.pageNum = 1
|
||||
this.index()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user