fix: drawer component header does not take effect (#4844)

This commit is contained in:
Vben
2024-11-09 15:53:17 +08:00
committed by GitHub
parent 8617d3dd1e
commit 4005023fd4
8 changed files with 42 additions and 41 deletions

View File

@@ -29,11 +29,11 @@ export function usePagination<T = any>(list: Ref<T[]>, pageSize: number) {
Math.ceil(unref(list).length / unref(pageSizeRef)),
);
const getPaginationList = computed(() => {
const paginationList = computed(() => {
return pagination(unref(list), unref(currentPage), unref(pageSizeRef));
});
const getTotal = computed(() => {
const total = computed(() => {
return unref(list).length;
});
@@ -53,5 +53,5 @@ export function usePagination<T = any>(list: Ref<T[]>, pageSize: number) {
currentPage.value = 1;
}
return { setCurrentPage, getTotal, setPageSize, getPaginationList };
return { setCurrentPage, total, setPageSize, paginationList };
}