PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.31
Booking for Appointments and Events Calendar – Amelia v1.2.31
2.4.9 2.4.8 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 year ago AmAttachmentFormField.vue 1 year ago AmCheckboxFormField.vue 1 year ago AmContentFormField.vue 3 years ago AmDatePickerFormField.vue 1 year ago AmInputFormField.vue 1 year ago AmPhoneFormField.vue 1 year ago AmRadioFormField.vue 1 year ago AmSelectFormField.vue 1 year ago AmSocialButton.vue 1 year ago
AmCheckboxFormField.vue
83 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
12 v-model="model"
13 >
14 <AmCheckbox
15 v-for="(option, i) in props.options"
16 :key="i"
17 :label="option.label"
18 :value="option.value"
19 />
20 </AmCheckboxGroup>
21 </el-form-item>
22 </template>
23
24 <script setup>
25 // * _components
26 import AmCheckboxGroup from '../../_components/checkbox/AmCheckboxGroup.vue'
27 import AmCheckbox from '../../_components/checkbox/AmCheckbox.vue'
28
29 // * Import from Vue
30 import {
31 computed,
32 ref,
33 toRefs
34 } from "vue";
35
36 // * Form Item Props
37 let props = defineProps({
38 modelValue: {
39 type: [String, Array, Object, Number],
40 required: true
41 },
42 itemName: {
43 type: String,
44 required: true
45 },
46 label: {
47 type: String
48 },
49 labelPosition: {
50 type: String,
51 default: 'top'
52 },
53 options: {
54 type: Array,
55 }
56 })
57
58 // * Define Emits
59 const emits = defineEmits(['update:modelValue'])
60
61 // * Component model
62 let { modelValue } = toRefs(props)
63 let model = computed({
64 get: () => modelValue.value,
65 set: (val) => {
66 emits('update:modelValue', val)
67 }
68 })
69
70 // * Form Item Reference
71 let formFieldRef = ref(null)
72
73 defineExpose({
74 formFieldRef
75 })
76 </script>
77
78 <script>
79 export default {
80 name: "CheckboxFormField"
81 }
82 </script>
83