- 卡密列表展示与分页功能 - 单个/批量创建卡密 - 卡密删除与批量删除 - 卡密导出功能 (file-saver) - 启用/禁用状态切换 - 状态判断 (有效/已使用/已失效) - Toast 通知系统 (vue-sonner) - 登录页面错误提示优化 - 后端登录错误消息中文化
34 lines
1.0 KiB
Vue
34 lines
1.0 KiB
Vue
<script setup lang="ts">
|
|
import type { PaginationPrevProps } from "reka-ui"
|
|
import type { HTMLAttributes } from "vue"
|
|
import type { ButtonVariants } from '@/components/ui/button'
|
|
import { reactiveOmit } from "@vueuse/core"
|
|
import { ChevronLeftIcon } from "lucide-vue-next"
|
|
import { PaginationPrev, useForwardProps } from "reka-ui"
|
|
import { cn } from "@/lib/utils"
|
|
import { buttonVariants } from '@/components/ui/button'
|
|
|
|
const props = withDefaults(defineProps<PaginationPrevProps & {
|
|
size?: ButtonVariants["size"]
|
|
class?: HTMLAttributes["class"]
|
|
}>(), {
|
|
size: "default",
|
|
})
|
|
|
|
const delegatedProps = reactiveOmit(props, "class", "size")
|
|
const forwarded = useForwardProps(delegatedProps)
|
|
</script>
|
|
|
|
<template>
|
|
<PaginationPrev
|
|
data-slot="pagination-previous"
|
|
:class="cn(buttonVariants({ variant: 'ghost', size }), 'gap-1 px-2.5 sm:pr-2.5', props.class)"
|
|
v-bind="forwarded"
|
|
>
|
|
<slot>
|
|
<ChevronLeftIcon />
|
|
<span class="hidden sm:block">Previous</span>
|
|
</slot>
|
|
</PaginationPrev>
|
|
</template>
|