Skip to content

Commit

Permalink
docs(table): fix pagination demo
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn committed Aug 23, 2024
1 parent 331e241 commit cfd6dc4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/table/_example-ts/pagination-ajax.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ const rehandleChange: TableProps['onChange'] = (changeParams, triggerAndData) =>
// BaseTable 中只有 page-change 事件,没有 change 事件
const onPageChange: TableProps['onPageChange'] = async (pageInfo) => {
console.log('page-change', pageInfo);
// pagination.current = pageInfo.current;
// pagination.pageSize = pageInfo.pageSize;
// 下面为受控方式,如果使用此方式,将pagination内的defaultCurrent改为current
// pagination.value.current = pageInfo.current;
// pagination.value.pageSize = pageInfo.pageSize;
await fetchData(pageInfo);
};
onMounted(async () => {
Expand Down
5 changes: 3 additions & 2 deletions src/table/_example/pagination-ajax.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ const rehandleChange = (changeParams, triggerAndData) => {
// BaseTable 中只有 page-change 事件,没有 change 事件
const onPageChange = async (pageInfo) => {
console.log('page-change', pageInfo);
// pagination.current = pageInfo.current;
// pagination.pageSize = pageInfo.pageSize;
// 下面为受控方式,如果使用此方式,将pagination内的defaultCurrent改为current
// pagination.value.current = pageInfo.current;
// pagination.value.pageSize = pageInfo.pageSize;
await fetchData(pageInfo);
};
Expand Down

0 comments on commit cfd6dc4

Please sign in to comment.