<el-pagination
:handleSizeChange="handleSizeChange"
:handleCurrentChange="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10, 20, 50, 100]"
:total="totalData"
layout="total, prev, pager, next, jumper"
>
</el-pagination>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:page-sizes="[20, 60, 100, 300]"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
/>
</div>
"dependencies": {
"axios": "^0.18.0",
"babel-polyfill": "^6.26.0",
"countup.js": "^1.9.3",
"cross-env": "^6.0.3",
"echarts": "^4.2.0-rc.2",
"element-ui": "2.4.6",
"file-saver": "^2.0.0-rc.4",
"normalize.css": "^7.0.0",
"nprogress": "^0.2.0",
"v-charts": "^1.18.0",
"vue": "^2.5.2",
"vue-countup-v2": "^1.0.3",
"vue-cropper": "^0.4.8",
"vue-print-nb": "^1.0.3",
"vue-qr": "^1.5.2",
"vue-router": "^3.0.1",
"vuex": "^3.0.1",
"xlsx": "^0.14.0"
}
methods: {
handleSizeChange: function (pageSize) {
let _this = this
_this.pageSize = pageSize
_this.handleCurrentChange(_this.currentPage)
// console.log(' handleSizeChange == ', pageSize)
},
handleCurrentChange (currentPage) {
let _this = this
_this.currentPage = currentPage
_this.currentChangePage(currentPage)
// console.log('handleCurrentChange == ', currentPage)
},
currentChangePage: function (currentPage) {
// console.log('currentChangePage == ', currentPage)
let _this = this
let dataPost = {
data: {
pageNum: currentPage,
pageSize: _this.pageSize,
// schoolId: '8',
schoolId: _this.searchList.schoolId,
trainDate: _this.searchList.trainDate,
elasticType: _this.findDataType
},
success: _this.handlePageData
}
console.log('dataPost == ', dataPost)
_this.getCourseData(dataPost)
}
}
引用了import elPagination from '@/components/elPagination'
导致的,注释掉即可