【fix ESLint】src/components/table
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import T from 'ant-design-vue/es/table/Table'
|
import T from 'ant-design-vue/es/table/Table'
|
||||||
import get from 'lodash.get'
|
import get from 'lodash.get'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -84,12 +85,10 @@ export default {
|
|||||||
},
|
},
|
||||||
loadData (pagination, filters, sorter) {
|
loadData (pagination, filters, sorter) {
|
||||||
this.localLoading = true
|
this.localLoading = true
|
||||||
var result = this.data(
|
const result = this.data(
|
||||||
Object.assign({
|
Object.assign({
|
||||||
pageNo: (pagination && pagination.current) ||
|
pageNo: (pagination && pagination.current) || this.localPagination.current,
|
||||||
this.localPagination.current,
|
pageSize: (pagination && pagination.pageSize) || this.localPagination.pageSize
|
||||||
pageSize: (pagination && pagination.pageSize) ||
|
|
||||||
this.localPagination.pageSize
|
|
||||||
},
|
},
|
||||||
(sorter && sorter.field && {
|
(sorter && sorter.field && {
|
||||||
sortField: sorter.field
|
sortField: sorter.field
|
||||||
@@ -98,8 +97,7 @@ export default {
|
|||||||
sortOrder: sorter.order
|
sortOrder: sorter.order
|
||||||
}) || {}, {
|
}) || {}, {
|
||||||
...filters
|
...filters
|
||||||
}
|
})
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if (result instanceof Promise) {
|
if (result instanceof Promise) {
|
||||||
@@ -112,7 +110,7 @@ export default {
|
|||||||
this.localPagination.pageSize
|
this.localPagination.pageSize
|
||||||
});
|
});
|
||||||
// update--begin--autor:wangshuai-----date:20200724------for:判断showPagination是否为false------
|
// update--begin--autor:wangshuai-----date:20200724------for:判断showPagination是否为false------
|
||||||
(!this.showPagination || !r.totalCount && this.showPagination === 'auto') && (this.localPagination = false)
|
((!this.showPagination || !r.totalCount) && this.showPagination === 'auto') && (this.localPagination = false)
|
||||||
// update--end--autor:wangshuai-----date:20200724------for:判断showPagination是否为false-----
|
// update--end--autor:wangshuai-----date:20200724------for:判断showPagination是否为false-----
|
||||||
this.localDataSource = r.data // 返回结果中的数组数据
|
this.localDataSource = r.data // 返回结果中的数组数据
|
||||||
this.localLoading = false
|
this.localLoading = false
|
||||||
@@ -217,9 +215,11 @@ export default {
|
|||||||
Object.keys(T.props).forEach(k => {
|
Object.keys(T.props).forEach(k => {
|
||||||
const localKey = `local${k.substring(0, 1).toUpperCase()}${k.substring(1)}`
|
const localKey = `local${k.substring(0, 1).toUpperCase()}${k.substring(1)}`
|
||||||
if (localKeys.includes(localKey)) {
|
if (localKeys.includes(localKey)) {
|
||||||
return props[k] = _vm[localKey]
|
const tempItem = props[k] = _vm[localKey]
|
||||||
|
return tempItem
|
||||||
}
|
}
|
||||||
return props[k] = _vm[k]
|
const tempItemA = props[k] = _vm[k]
|
||||||
|
return tempItemA
|
||||||
})
|
})
|
||||||
|
|
||||||
// 显示信息提示
|
// 显示信息提示
|
||||||
|
|||||||
Reference in New Issue
Block a user