移除mixins目录

This commit is contained in:
hooray
2021-09-28 04:00:28 +08:00
parent 3dfdf9ea44
commit b6f7cbd156
-48
View File
@@ -1,48 +0,0 @@
export default {
data() {
return {
loading: false,
sort: null,
order: null,
pagination: {
page: 1,
size: 10,
total: 0,
sizes: [10, 20, 50, 100],
layout: 'total, sizes, ->, prev, pager, next, jumper'
}
}
},
methods: {
getParams(params = {}) {
const baseParams = {
from: (this.pagination.page - 1) * this.pagination.size,
limit: this.pagination.size
}
if (this.sort && this.order) {
baseParams.sort = this.sort
baseParams.order = this.order
}
Object.assign(baseParams, params)
return baseParams
},
onSizeChange(size) {
this.pagination.size = size
this.getDataList()
},
onCurrentChange(page) {
this.pagination.page = page
this.getDataList()
},
onSortChange(params) {
if (params.order) {
this.sort = params.prop
this.order = params.order === 'ascending' ? 'asc' : 'desc'
} else {
this.sort = null
this.order = null
}
this.getDataList()
}
}
}