feat: add Checkbox and Radio field families

This commit is contained in:
maoyingjie
2026-10-22 09:15:27 +08:00
parent a4fb3c550a
commit bcadbeaf8c
75 changed files with 5293 additions and 22 deletions
+30
View File
@@ -0,0 +1,30 @@
<script setup lang="ts">
import {
CheckboxContent,
CheckboxControl,
CheckboxIndicator,
Checkbox,
} from "@heroui-vue/components";
import { ref } from "vue";
const isSelected = ref(true);
</script>
<template>
<div class="flex flex-col gap-3">
<Checkbox
id="email-notifications"
:is-selected="isSelected"
@update:checked="isSelected = $event"
>
<CheckboxContent>
<CheckboxControl>
<CheckboxIndicator />
</CheckboxControl>
邮件通知
</CheckboxContent>
</Checkbox>
<p class="text-sm text-muted">
状态:
<span class="font-medium">{{ isSelected ? "已勾选" : "未勾选" }}</span>
</p>
</div>
</template>