PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.6
Booking for Appointments and Events Calendar – Amelia v2.4.6
2.4.7 2.4.6 2.4.5 2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / v3 / src / views / common / FormFields / AmCheckboxFormField.vue
ameliabooking / v3 / src / views / common / FormFields Last commit date
AmAddressFormField.vue 1 month ago AmAttachmentFormField.vue 1 month ago AmCheckboxFormField.vue 1 month ago AmContentFormField.vue 1 month ago AmDatePickerFormField.vue 1 month ago AmInputFormField.vue 1 month ago AmPhoneFormField.vue 1 month ago AmRadioFormField.vue 1 month ago AmSelectFormField.vue 1 month ago AmSocialButton.vue 1 month ago
AmCheckboxFormField.vue
77 lines
1 <template>
2 <el-form-item
3 ref="formFieldRef"
4 class="am-ff__item"
5 :prop="props.itemName"
6 :label-position="props.labelPosition"
7 >
8 <template #label>
9 <span class="am-ff__item-label" v-html="props.label" />
10 </template>
11 <AmCheckboxGroup v-model="model">
12 <AmCheckbox
13 v-for="(option, i) in props.options"
14 :key="i"
15 :label="option.label"
16 :value="option.value"
17 />
18 </AmCheckboxGroup>
19 </el-form-item>
20 </template>
21
22 <script setup>
23 // * _components
24 import AmCheckboxGroup from '../../_components/checkbox/AmCheckboxGroup.vue'
25 import AmCheckbox from '../../_components/checkbox/AmCheckbox.vue'
26
27 // * Import from Vue
28 import { computed, ref, toRefs } from 'vue'
29
30 // * Form Item Props
31 let props = defineProps({
32 modelValue: {
33 type: [String, Array, Object, Number],
34 required: true,
35 },
36 itemName: {
37 type: String,
38 required: true,
39 },
40 label: {
41 type: String,
42 },
43 labelPosition: {
44 type: String,
45 default: 'top',
46 },
47 options: {
48 type: Array,
49 },
50 })
51
52 // * Define Emits
53 const emits = defineEmits(['update:modelValue'])
54
55 // * Component model
56 let { modelValue } = toRefs(props)
57 let model = computed({
58 get: () => modelValue.value,
59 set: (val) => {
60 emits('update:modelValue', val)
61 },
62 })
63
64 // * Form Item Reference
65 let formFieldRef = ref(null)
66
67 defineExpose({
68 formFieldRef,
69 })
70 </script>
71
72 <script>
73 export default {
74 name: 'CheckboxFormField',
75 }
76 </script>
77