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
@@ -0,0 +1,30 @@
<script setup lang="ts">
import { ref } from "vue";
import {
Checkbox,
CheckboxContent,
CheckboxControl,
CheckboxIndicator,
Description,
} from "@heroui-vue/components";
const isIndeterminate = ref(true),
isSelected = ref(false);
function update(value: boolean) {
isSelected.value = value;
isIndeterminate.value = false;
}
</script>
<template>
<Checkbox
id="select-all"
:is-indeterminate="isIndeterminate"
:checked="isSelected"
@update:checked="update"
>
<CheckboxContent>
<CheckboxControl><CheckboxIndicator /></CheckboxControl>
全选
</CheckboxContent>
<Description>展示部分选中状态(短横线图标)</Description>
</Checkbox>
</template>