|
@@ -89,7 +89,7 @@ export default {
|
|
|
default: ''
|
|
|
},
|
|
|
index: {
|
|
|
- type: [String,Number],
|
|
|
+ type: [String, Number],
|
|
|
default: ''
|
|
|
}
|
|
|
}),
|
|
@@ -127,9 +127,9 @@ export default {
|
|
|
pageSize: this.pageSize,
|
|
|
showSizeChanger: this.showSizeChanger
|
|
|
}) || false
|
|
|
- console.log('this.localPagination', this.localPagination)
|
|
|
+ // console.log('this.localPagination', this.localPagination)
|
|
|
this.needTotalList = this.initTotalList(this.columns)
|
|
|
- if(this.defaultLoadData){
|
|
|
+ if (this.defaultLoadData) {
|
|
|
this.loadData()
|
|
|
}
|
|
|
},
|
|
@@ -157,7 +157,7 @@ export default {
|
|
|
pageNo: (pagination && pagination.current) ||
|
|
|
this.showPagination && this.localPagination.current || this.pageNum,
|
|
|
pageSize: (pagination && pagination.pageSize) ||
|
|
|
- this.showPagination && this.localPagination.pageSize || this.pageSize,
|
|
|
+ this.showPagination && this.localPagination.pageSize || this.pageSize
|
|
|
},
|
|
|
(sorter && sorter.field && {
|
|
|
sortField: sorter.field
|
|
@@ -168,20 +168,20 @@ export default {
|
|
|
...filters
|
|
|
}
|
|
|
)
|
|
|
- if(this.tableId != ''){
|
|
|
+ if (this.tableId != '') {
|
|
|
parameter.tableId = this.tableId
|
|
|
}
|
|
|
- if(this.index != ''){
|
|
|
+ if (this.index != '') {
|
|
|
parameter.index = this.index
|
|
|
}
|
|
|
- console.log('parameter', parameter)
|
|
|
+ // console.log('parameter', parameter)
|
|
|
const result = this.data(parameter)
|
|
|
// 对接自己的通用数据接口需要修改下方代码中的 r.pageNo, r.count, r.data
|
|
|
// eslint-disable-next-line
|
|
|
if ((typeof result === 'object' || typeof result === 'function') && typeof result.then === 'function') {
|
|
|
result.then(r => {
|
|
|
const list = r.list || r.data || r
|
|
|
- console.log(r,'rrrrrrrrrr')
|
|
|
+ // console.log(r,'rrrrrrrrrr')
|
|
|
this.localPagination = this.showPagination && Object.assign({}, this.localPagination, {
|
|
|
current: r.pageNo, // 返回结果中的当前分页数
|
|
|
total: Number(r.count), // 返回结果中的总记录数
|
|
@@ -306,7 +306,7 @@ export default {
|
|
|
if (k === 'rowSelection') {
|
|
|
if (showAlert && this.rowSelection) {
|
|
|
// 如果需要使用alert,则重新绑定 rowSelection 事件
|
|
|
- console.log('this.rowSelection', this.rowSelection)
|
|
|
+ // console.log('this.rowSelection', this.rowSelection)
|
|
|
props[k] = {
|
|
|
...this.rowSelection,
|
|
|
selectedRows: this.selectedRows,
|