feat: 完成整体内容开发
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { ChevronLeftIcon, ChevronRightIcon } from "@heroicons/vue/24/outline";
|
||||
import { MoreHorizontal } from "lucide-vue-next";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
Pagination,
|
||||
PaginationContent,
|
||||
@@ -40,7 +41,7 @@ const pageCount = computed(() => Math.ceil(props.total / props.pageSize));
|
||||
@update:page="(val: number) => emits('update:page', val)"
|
||||
>
|
||||
<PaginationContent v-slot="{ items }">
|
||||
<PaginationPrevious class="w-5.5 h-5.5 text-[#2563EB]!">
|
||||
<PaginationPrevious class="w-5.5 h-5.5 text-primary!">
|
||||
<ChevronLeftIcon class="size-4" />
|
||||
</PaginationPrevious>
|
||||
<template v-for="(item, index) in items" :key="index">
|
||||
@@ -48,27 +49,27 @@ const pageCount = computed(() => Math.ceil(props.total / props.pageSize));
|
||||
v-if="item.type === 'page'"
|
||||
:value="item.value"
|
||||
:is-active="item.value === page"
|
||||
class="w-fit min-w-5.5 h-5.5 text-xs px-1 text-[#71717A]/80"
|
||||
class="w-fit min-w-5.5 h-5.5 text-xs px-1 text-muted-foreground"
|
||||
:class="{
|
||||
'text-[#2563EB]! border-[#2563EB]!': item.value === page
|
||||
'text-primary! border-primary!': item.value === page
|
||||
}"
|
||||
>
|
||||
{{ item.value }}
|
||||
</PaginationItem>
|
||||
<PaginationEllipsis
|
||||
v-else-if="item.type === 'ellipsis'"
|
||||
class="text-[#71717A]/80"
|
||||
class="text-muted-foreground"
|
||||
>
|
||||
<Button
|
||||
variant="outline"
|
||||
:disabled="props.load"
|
||||
class="w-5.5 h-5.5 p-0 text-[12px] text-[#71717A]/80 border-transparent bg-white rounded"
|
||||
class="w-5.5 h-5.5 rounded-2xl border-transparent bg-background p-0 text-[12px] text-muted-foreground"
|
||||
>
|
||||
<MoreHorizontal class="size-4" />
|
||||
</Button>
|
||||
</PaginationEllipsis>
|
||||
</template>
|
||||
<PaginationNext class="w-5.5 h-5.5 text-[#2563EB]!">
|
||||
<PaginationNext class="w-5.5 h-5.5 text-primary!">
|
||||
<ChevronRightIcon class="size-4" />
|
||||
</PaginationNext>
|
||||
</PaginationContent>
|
||||
|
||||
Reference in New Issue
Block a user