perf: 账号管理页面逻辑调整

This commit is contained in:
rd
2025-07-16 17:40:45 +08:00
parent 876df2c694
commit 87c729b260

View File

@ -6,7 +6,7 @@
</div> </div>
<a-table <a-table
:columns="columns" :columns="columns"
:data="data" :data="dataSource"
:pagination="pagination" :pagination="pagination"
class="mt-8px h-540px" class="mt-8px h-540px"
@page-change="handlePageChange" @page-change="handlePageChange"
@ -79,7 +79,7 @@ const columns = [
slotName: 'action', slotName: 'action',
}, },
]; ];
const data = ref([]); const dataSource = ref([]);
const pagination = reactive({ const pagination = reactive({
total: 0, total: 0,
showPageSize: true, showPageSize: true,
@ -130,10 +130,10 @@ function handlePageSizeChange(pageSize: number) {
async function getSubAccount() { async function getSubAccount() {
const res = await fetchSubAccountPage(params); const res = await fetchSubAccountPage(params);
const { data, total, code } = res.data; const { data, code } = res;
if (code === 200) { if (code === 200) {
pagination.total = total; pagination.total = data.total;
data.value = data; dataSource.value = data?.data ?? [];
} }
} }
async function handleAddAccount() { async function handleAddAccount() {