feat: 分页逻辑处理

This commit is contained in:
rd
2025-09-05 10:39:01 +08:00
parent 8b42a67e9f
commit 72dabf9a9e
18 changed files with 76 additions and 127 deletions

View File

@ -45,7 +45,11 @@
<Table
ref="tableRef"
:dataSource="dataSource"
:rowSelection="rowSelection"
:rowSelection="{
selectedRowKeys,
onSelect: handleSelect,
onSelectAll: handleSelectAll,
}"
:rowKey="ROW_KEY"
:pagination="false"
:scroll="{ x: '100%', y: '100%' }"
@ -125,21 +129,13 @@ const query = ref(cloneDeep(INITIAL_FORM));
const form = ref(null);
const ROW_KEY = 'account_id';
const {
selectedRowKeys,
selectedRows,
dataSource,
pageInfo,
onPageChange,
rowSelection,
handleSelect,
handleSelectAll,
} = useTableSelectionWithPagination({
rowKey: ROW_KEY,
onPageChange: () => {
getData();
},
});
const { selectedRowKeys, selectedRows, dataSource, pageInfo, onPageChange, handleSelect, handleSelectAll } =
useTableSelectionWithPagination({
rowKey: ROW_KEY,
onPageChange: () => {
getData();
},
});
const open = (formData) => {
const { platform, account, password } = formData;