feat: add Checkbox and Radio field families
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user