Skip to content

[Pagination] onChange在当前页不是第一页的时候改变分页大小不会触发 #6226

@XF-Store

Description

@XF-Store

tdesign-vue-next 版本

v1.17.3

重现链接

暂无

重现步骤

table组件使用Pagination参数配置:
pagination: {
defaultCurrent: 1,
defaultPageSize: 20,
current: 1,
pageSize: 20,
total: 0,
showFirstAndLastPageBtn: true,
showJumper: true,
pageSizeOptions: [20, 50, 100, 200, 500, 1000],
onChange: this.handlePageChange,
}
handlePageChange(pageInfo) {
const _this = this;
_this.$vf.doFetch(
_this.$vf.getUrlJoin('admin/logs'),
{ page: pageInfo.current, limit: pageInfo.pageSize },
(result) => {
_this.table.data = result.data;
_this.table.pagination.total = result.count;
_this.table.pagination.current = pageInfo.current;
_this.table.pagination.pageSize = pageInfo.pageSize;
}
);
},

期望结果

期望解决分页组件的这个问题

实际结果

我现在使用onCurrentChange和onPageSizeChange来解决的问题

框架版本

vue v3.5.24

浏览器版本

Microsoft Edge 是最新版本。
版本 142.0.3595.94 (正式版本) (64 位)

系统版本

win10

Node版本

No response

补充说明

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions