PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.4
Booking for Appointments and Events Calendar – Amelia v2.4.4
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 / AmSelectFormField.vue
ameliabooking / v3 / src / views / common / FormFields Last commit date
AmAddressFormField.vue 5 days ago AmAttachmentFormField.vue 5 days ago AmCheckboxFormField.vue 5 days ago AmContentFormField.vue 5 days ago AmDatePickerFormField.vue 5 days ago AmInputFormField.vue 5 days ago AmPhoneFormField.vue 5 days ago AmRadioFormField.vue 5 days ago AmSelectFormField.vue 5 days ago AmSocialButton.vue 5 days ago
AmSelectFormField.vue
115 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 <AmSelect
12 v-model="model"
13 :fit-input-width="true"
14 :clearable="props.clearable"
15 :prefix-icon="props.prefixIcon"
16 :placeholder="props.placeholder"
17 :disabled="props.disabled"
18 :teleported="props.teleported"
19 :loading="props.loading"
20 :loading-text="props.loadingText"
21 >
22 <AmOption
23 v-for="(option, i) in props.options"
24 :key="i"
25 :label="option.label"
26 :value="option.value ? option.value : option.label"
27 />
28 </AmSelect>
29 </el-form-item>
30 </template>
31
32 <script setup>
33 // * _components
34 import AmSelect from '../../_components/select/AmSelect.vue'
35 import AmOption from '../../_components/select/AmOption.vue'
36
37 // * Import from Vue
38 import { computed, ref, toRefs } from 'vue'
39
40 // * Form Item Props
41 let props = defineProps({
42 modelValue: {
43 type: [String, Array, Object, Number, null],
44 required: true,
45 },
46 itemName: {
47 type: String,
48 required: true,
49 },
50 label: {
51 type: String,
52 },
53 labelPosition: {
54 type: String,
55 default: 'top',
56 },
57 options: {
58 type: Array,
59 },
60 prefixIcon: {
61 type: [String, Object],
62 default: '',
63 },
64 placeholder: {
65 type: String,
66 default: '',
67 },
68 clearable: {
69 type: Boolean,
70 default: true,
71 },
72 disabled: {
73 type: Boolean,
74 default: false,
75 },
76 loading: {
77 type: Boolean,
78 default: false,
79 },
80 loadingText: {
81 type: String,
82 default: 'Loading...',
83 },
84 teleported: {
85 type: Boolean,
86 default: true,
87 },
88 })
89
90 // * Define Emits
91 const emits = defineEmits(['update:modelValue'])
92
93 // * Component model
94 let { modelValue } = toRefs(props)
95 let model = computed({
96 get: () => modelValue.value,
97 set: (val) => {
98 emits('update:modelValue', val)
99 },
100 })
101
102 // * Form Item Reference
103 let formFieldRef = ref(null)
104
105 defineExpose({
106 formFieldRef,
107 })
108 </script>
109
110 <script>
111 export default {
112 name: 'SelectFormField',
113 }
114 </script>
115