Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zly2006 committed Mar 19, 2024
1 parent 12d3586 commit 78d838c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/views/admin/UserList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ const search = ref('');
async function loadItems(options: {
page: number;
itemsPerPage: number;
sortBy: string[];
sortBy: {
key: string,
order: 'asc' | 'desc'
}[];
sortDesc: boolean;
}) {
loading.value = true;
console.log(options)
const response = await doFetchGet(
`/api/admin/user/list?page=${options.page}&pageSize=${options.itemsPerPage}&sort=${options.sortBy[0]}&order=${options.sortDesc ? 'desc' : 'asc'}&search=${search.value}`,
`/api/admin/user/list?page=${options.page}&pageSize=${options.itemsPerPage}&sort=${options.sortBy[0]?.key}&order=${options.sortBy[0]?.order}&search=${search.value}`,
);
if (response.ok) {
const data: {
Expand Down

0 comments on commit 78d838c

Please sign in to comment.