介绍
本文档主要用于描述 ShadcnBadge
组件的一些功能和用法。
用法
查看代码
vue
<template>
<ShadcnBadge text="Badge">Badge</ShadcnBadge>
</template>
<script setup lang="ts">
</script>
类型 (type)
查看代码
vue
<template>
<ShadcnBadge type="primary" text="Badge">Primary</ShadcnBadge>
<ShadcnBadge type="success" text="Badge">Success</ShadcnBadge>
<ShadcnBadge type="warning" text="Badge">Warning</ShadcnBadge>
<ShadcnBadge type="danger" text="Badge">Danger</ShadcnBadge>
</template>
<script setup lang="ts">
</script>
文本 (text)
查看代码
vue
<template>
<ShadcnBadge text="Text">Badge</ShadcnBadge>
</template>
<script setup lang="ts">
</script>
点 (dot)
查看代码
vue
<template>
<ShadcnBadge dot>Badge</ShadcnBadge>
</template>
<script setup lang="ts">
</script>
最大值 (max)
查看代码
vue
<template>
<ShadcnBadge text="10" max="5">Badge</ShadcnBadge>
</template>
<script setup lang="ts">
</script>