- 卡密列表展示与分页功能 - 单个/批量创建卡密 - 卡密删除与批量删除 - 卡密导出功能 (file-saver) - 启用/禁用状态切换 - 状态判断 (有效/已使用/已失效) - Toast 通知系统 (vue-sonner) - 登录页面错误提示优化 - 后端登录错误消息中文化
27 lines
660 B
Vue
27 lines
660 B
Vue
<script setup lang="ts">
|
|
import type { PrimitiveProps } from "reka-ui"
|
|
import type { HTMLAttributes } from "vue"
|
|
import type { BadgeVariants } from "."
|
|
import { reactiveOmit } from "@vueuse/core"
|
|
import { Primitive } from "reka-ui"
|
|
import { cn } from "@/lib/utils"
|
|
import { badgeVariants } from "."
|
|
|
|
const props = defineProps<PrimitiveProps & {
|
|
variant?: BadgeVariants["variant"]
|
|
class?: HTMLAttributes["class"]
|
|
}>()
|
|
|
|
const delegatedProps = reactiveOmit(props, "class")
|
|
</script>
|
|
|
|
<template>
|
|
<Primitive
|
|
data-slot="badge"
|
|
:class="cn(badgeVariants({ variant }), props.class)"
|
|
v-bind="delegatedProps"
|
|
>
|
|
<slot />
|
|
</Primitive>
|
|
</template>
|