修复 mixins/crud.js 的分页问题 github#9

close https://github.com/elunez/eladmin-mp/issues/9
This commit is contained in:
Zheng Jie 2023-07-26 14:28:34 +08:00
parent ac50d79a7b
commit 76dad86e53
4 changed files with 5 additions and 5 deletions

View File

@ -89,12 +89,12 @@ export default {
},
// 改变页码
pageChange(e) {
this.page = e - 1
this.page = e
this.init()
},
// 改变每页显示数
sizeChange(e) {
this.page = 0
this.page = 1
this.size = e
this.init()
},

View File

@ -26,7 +26,7 @@
<!--分页组件-->
<el-pagination
:total="total"
:current-page="page + 1"
:current-page="page"
style="margin-top: 8px"
layout="total, prev, pager, next, sizes"
@size-change="sizeChange"

View File

@ -46,7 +46,7 @@
<!--分页组件-->
<el-pagination
:total="total"
:current-page="page + 1"
:current-page="page"
:page-size="6"
style="margin-top:8px;"
layout="total, prev, pager, next"

View File

@ -88,7 +88,7 @@
<!--分页组件-->
<el-pagination
:total="total"
:current-page="page + 1"
:current-page="page"
style="margin-top: 8px;"
layout="total, prev, pager, next, sizes"
@size-change="sizeChange"