perf: 账号管理页面逻辑调整
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
</div>
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
:data="dataSource"
|
||||
:pagination="pagination"
|
||||
class="mt-8px h-540px"
|
||||
@page-change="handlePageChange"
|
||||
@ -79,7 +79,7 @@ const columns = [
|
||||
slotName: 'action',
|
||||
},
|
||||
];
|
||||
const data = ref([]);
|
||||
const dataSource = ref([]);
|
||||
const pagination = reactive({
|
||||
total: 0,
|
||||
showPageSize: true,
|
||||
@ -130,10 +130,10 @@ function handlePageSizeChange(pageSize: number) {
|
||||
|
||||
async function getSubAccount() {
|
||||
const res = await fetchSubAccountPage(params);
|
||||
const { data, total, code } = res.data;
|
||||
const { data, code } = res;
|
||||
if (code === 200) {
|
||||
pagination.total = total;
|
||||
data.value = data;
|
||||
pagination.total = data.total;
|
||||
dataSource.value = data?.data ?? [];
|
||||
}
|
||||
}
|
||||
async function handleAddAccount() {
|
||||
|
||||
Reference in New Issue
Block a user