返回 slidev
FormCheckbox.vue
根目录 / packages / client / internals / FormCheckbox.vue
1 <script setup lang="ts">
2 defineProps<{
3 disabled?: boolean
4 }>()
5
6 const value = defineModel<boolean>('modelValue', {
7 type: Boolean,
8 })
9 </script>
10
11 <template>
12 <div border="~ main rounded" flex="~ gap-2 items-center" relative h-5 w-5 p0.5 hover:bg-active p1>
13 <div i-ri-check-line :class="value ? '' : 'op0'" />
14 <input v-model="value" type="checkbox" absolute inset-0 opacity-10 :disabled="disabled">
15 </div>
16 </template>
17
17 lines Plain Text