<el-pagination
layout="total, sizes, prev, pager, next, jumper"
background
:total="pagination.total"
:current-page.sync="pagination.current"
:page-size.sync="pagination.limit"
/>
import paginationMixin from '@/mixins/pagination'
mixins: [paginationMixin],
初始重赋值total,num pagesize
async _fetchData (params) {
this.loading = true
try {
if (this.type === 'havae') {
const { data } = await depotList(params)
this.table.row = data.list
this.pagination.total = data.totalnum
} else {
const { data } = await getHistoryCartQuote(this.scrmCsrId)
this.historyTable.row = data
}
} finally {
this.loading = false
}
},
【vue】element 封装的分页使用
于 2021-01-29 09:20:34 首次发布