tableCommon.js
668 Bytes
export default {
data() {
return {
pagination: {
page: 1,
pageSize: 30,
total: 0,
},
selectedRows: [],
pageSizes: [10, 20, 30, 50, 100, 200, 300],
headerStyle: {
background: '#fafafa',
},
}
},
computed: {
tableHeight() {
return this.$baseTableHeight(-47)
},
},
methods: {
selectionChange(selection) {
this.selectedRows = selection
},
handleSizeChange(size) {
this.pagination.pageSize = size
this.search()
},
handleCurrentChange(currentPage) {
this.pagination.page = currentPage
this.search('pageChange')
},
},
}