PluginProbe
The Innovative Form Builder – IvyForms / 0.4
The Innovative Form Builder – IvyForms v0.4
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / frontend / src / views / _components / checkbox / IvyCheckboxGroup.vue

IvyCheckboxGroup.vue in The Innovative Form Builder – IvyForms 0.4, at frontend/src/views/_components/checkbox/IvyCheckboxGroup.vue

42 lines 868 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <template>
2 <ElCheckboxGroup
3 v-model="localModelValue"
4 class="ivyforms-checkbox-group"
5 v-bind="{ ...$props, ...$attrs }"
6 @change="(eventValue: CheckboxValueType[]) => $emit('change', eventValue)"
7 >
8 <slot />
9 </ElCheckboxGroup>
10 </template>
11
12 <script setup lang="ts">
13 import type { CheckboxGroupValueType, CheckboxValueType } from 'element-plus'
14 import { computed } from 'vue'
15
16 const props = defineProps<{
17 modelValue?: CheckboxGroupValueType | undefined
18 }>()
19
20 const emit = defineEmits(['update:modelValue', 'change'])
21
22 const localModelValue = computed({
23 get() {
24 return props.modelValue
25 },
26 set(value) {
27 emit('update:modelValue', value)
28 },
29 })
30 </script>
31
32 <style lang="scss">
33 @use 'sass:list' as *;
34 @use 'sass:meta' as *;
35 // Checkbox Group
36 .ivyforms-checkbox-group {
37 display: flex;
38 gap: 8px;
39 flex-direction: column;
40 }
41 </style>
42