perf: 账号管理页面逻辑调整
This commit is contained in:
@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user