From cfd6dc4ffd324912eca1ea1addf61765885a941b Mon Sep 17 00:00:00 2001 From: Uyarn Date: Fri, 23 Aug 2024 16:05:10 +0800 Subject: [PATCH] docs(table): fix pagination demo --- src/table/_example-ts/pagination-ajax.vue | 5 +++-- src/table/_example/pagination-ajax.vue | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/table/_example-ts/pagination-ajax.vue b/src/table/_example-ts/pagination-ajax.vue index 806ea9ff1a..062b8ab94a 100644 --- a/src/table/_example-ts/pagination-ajax.vue +++ b/src/table/_example-ts/pagination-ajax.vue @@ -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 () => { diff --git a/src/table/_example/pagination-ajax.vue b/src/table/_example/pagination-ajax.vue index a427a36f75..d73797c5db 100644 --- a/src/table/_example/pagination-ajax.vue +++ b/src/table/_example/pagination-ajax.vue @@ -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); };