修改 传入参数方式
This commit is contained in:
@@ -12,6 +12,7 @@ interface TableStoreParams {
|
||||
method?: Method
|
||||
isWebPaging?: boolean // 是否前端分页
|
||||
showPage?: boolean
|
||||
paramsPOST?: boolean
|
||||
publicHeight?: number
|
||||
resetCallback?: () => void
|
||||
loadCallback?: () => void
|
||||
@@ -24,6 +25,7 @@ export default class TableStore {
|
||||
public method: Method
|
||||
public initData: any = null
|
||||
public isWebPaging = false
|
||||
public paramsPOST = true
|
||||
public showPage = true
|
||||
public table: CnTable = reactive({
|
||||
ref: null,
|
||||
@@ -47,6 +49,7 @@ export default class TableStore {
|
||||
constructor(public options: TableStoreParams) {
|
||||
this.url = options.url
|
||||
this.pk = options.pk || 'id'
|
||||
this.paramsPOST = options.paramsPOST || false
|
||||
this.isWebPaging = options.isWebPaging || false
|
||||
this.method = options.method || 'GET'
|
||||
this.table.column = options.column
|
||||
@@ -73,7 +76,7 @@ export default class TableStore {
|
||||
url: this.url,
|
||||
method: this.method
|
||||
},
|
||||
requestPayload(this.method, this.table.params)
|
||||
requestPayload(this.method, this.table.params, this.paramsPOST)
|
||||
)
|
||||
).then((res: any) => {
|
||||
if (res.data) {
|
||||
|
||||
Reference in New Issue
Block a user