feat: add Checkbox and Radio field families
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
CheckboxContent,
|
||||
CheckboxControl,
|
||||
CheckboxIndicator,
|
||||
Checkbox,
|
||||
} from "@heroui-vue/components";
|
||||
import { IconHeartFilled, IconPlus, IconMinus } from "@tabler/icons-vue";
|
||||
</script>
|
||||
<template>
|
||||
<div class="flex gap-4">
|
||||
<Checkbox default-selected name="heart">
|
||||
<CheckboxContent>
|
||||
<CheckboxControl>
|
||||
<CheckboxIndicator v-slot="{ isSelected }">
|
||||
<IconHeartFilled v-if="isSelected" aria-hidden="true" />
|
||||
</CheckboxIndicator>
|
||||
</CheckboxControl>
|
||||
心形
|
||||
</CheckboxContent>
|
||||
</Checkbox>
|
||||
<Checkbox default-selected name="plus">
|
||||
<CheckboxContent>
|
||||
<CheckboxControl>
|
||||
<CheckboxIndicator v-slot="{ isSelected }">
|
||||
<IconPlus v-if="isSelected" aria-hidden="true" />
|
||||
</CheckboxIndicator>
|
||||
</CheckboxControl>
|
||||
加号
|
||||
</CheckboxContent>
|
||||
</Checkbox>
|
||||
<Checkbox is-indeterminate name="indeterminate">
|
||||
<CheckboxContent>
|
||||
<CheckboxControl>
|
||||
<CheckboxIndicator v-slot="{ isIndeterminate }">
|
||||
<IconMinus v-if="isIndeterminate" aria-hidden="true" />
|
||||
</CheckboxIndicator>
|
||||
</CheckboxControl>
|
||||
部分选中
|
||||
</CheckboxContent>
|
||||
</Checkbox>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user