修复 mixins/crud.js 的分页问题 github#9
close https://github.com/elunez/eladmin-mp/issues/9
This commit is contained in:
parent
ac50d79a7b
commit
76dad86e53
@ -89,12 +89,12 @@ export default {
|
|||||||
},
|
},
|
||||||
// 改变页码
|
// 改变页码
|
||||||
pageChange(e) {
|
pageChange(e) {
|
||||||
this.page = e - 1
|
this.page = e
|
||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
// 改变每页显示数
|
// 改变每页显示数
|
||||||
sizeChange(e) {
|
sizeChange(e) {
|
||||||
this.page = 0
|
this.page = 1
|
||||||
this.size = e
|
this.size = e
|
||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<el-pagination
|
<el-pagination
|
||||||
:total="total"
|
:total="total"
|
||||||
:current-page="page + 1"
|
:current-page="page"
|
||||||
style="margin-top: 8px"
|
style="margin-top: 8px"
|
||||||
layout="total, prev, pager, next, sizes"
|
layout="total, prev, pager, next, sizes"
|
||||||
@size-change="sizeChange"
|
@size-change="sizeChange"
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<el-pagination
|
<el-pagination
|
||||||
:total="total"
|
:total="total"
|
||||||
:current-page="page + 1"
|
:current-page="page"
|
||||||
:page-size="6"
|
:page-size="6"
|
||||||
style="margin-top:8px;"
|
style="margin-top:8px;"
|
||||||
layout="total, prev, pager, next"
|
layout="total, prev, pager, next"
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<el-pagination
|
<el-pagination
|
||||||
:total="total"
|
:total="total"
|
||||||
:current-page="page + 1"
|
:current-page="page"
|
||||||
style="margin-top: 8px;"
|
style="margin-top: 8px;"
|
||||||
layout="total, prev, pager, next, sizes"
|
layout="total, prev, pager, next, sizes"
|
||||||
@size-change="sizeChange"
|
@size-change="sizeChange"
|
||||||
|
Loading…
Reference in New Issue
Block a user