|
问题描述:element ui 中的分页组件,代码如下:
<el-pagination background
layout="prev, pager, next"
:total="pagination.total"
:page-size="filterForm.maxResultCount"
:current-page="pagination.currentPage"
@current-change="getPageNumber">
</el-pagination>点击搜索后需要重置成第一页,代码如下:// 开始搜索
search() {
this.pagination.currentPage = 1
this.GetList()
}但点击搜索后 this.pagination.currentPage还是没修改解决方案: :current-page.sync="pagination.currentPage"在cureent-page后面加上.sync即可生效 参考 :https://segmentfault.com/q/1010000016766884 |
|
|