44 lines
1.3 KiB
Vue
44 lines
1.3 KiB
Vue
<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>
|