EmailFormField.vue
5 days ago
EmployeeFormField.vue
5 days ago
FirstNameFormField.vue
5 days ago
LastNameFormField.vue
5 days ago
LocationFormField.vue
5 days ago
PhoneFormField.vue
5 days ago
ServiceFormField.vue
5 days ago
EmailFormField.vue
59 lines
| 1 | <template> |
| 2 | <!-- Email --> |
| 3 | <el-form-item |
| 4 | v-if="amCustomize[pageRenderKey].infoStep.options.email.visibility" |
| 5 | class="am-fs__info-form__item" |
| 6 | prop="email" |
| 7 | label-position="top" |
| 8 | > |
| 9 | <template #label> |
| 10 | <span class="am-fs__info-form__label"> |
| 11 | {{ labelsDisplay('email_colon') }} |
| 12 | </span> |
| 13 | </template> |
| 14 | <AmInput |
| 15 | v-model="infoFormData.email" |
| 16 | name="email" |
| 17 | type="text" |
| 18 | :placeholder="labelsDisplay('enter_email')" |
| 19 | /> |
| 20 | </el-form-item> |
| 21 | <!-- /Email --> |
| 22 | </template> |
| 23 | |
| 24 | <script setup> |
| 25 | import AmInput from '../../../_components/input/AmInput.vue' |
| 26 | |
| 27 | import { computed, inject } from 'vue' |
| 28 | |
| 29 | let langKey = inject('langKey') |
| 30 | let amLabels = inject('labels') |
| 31 | |
| 32 | let pageRenderKey = inject('pageRenderKey') |
| 33 | let amCustomize = inject('customize') |
| 34 | |
| 35 | // * Label computed function |
| 36 | function labelsDisplay(label) { |
| 37 | let computedLabel = computed(() => { |
| 38 | return amCustomize.value[pageRenderKey.value].infoStep.translations && |
| 39 | amCustomize.value[pageRenderKey.value].infoStep.translations[label] && |
| 40 | amCustomize.value[pageRenderKey.value].infoStep.translations[label][langKey.value] |
| 41 | ? amCustomize.value[pageRenderKey.value].infoStep.translations[label][langKey.value] |
| 42 | : amLabels[label] |
| 43 | }) |
| 44 | |
| 45 | return computedLabel.value |
| 46 | } |
| 47 | |
| 48 | // * Form field data |
| 49 | let infoFormData = inject('infoFormData') |
| 50 | </script> |
| 51 | |
| 52 | <script> |
| 53 | export default { |
| 54 | name: 'EmailFormField', |
| 55 | } |
| 56 | </script> |
| 57 | |
| 58 | <style scoped></style> |
| 59 |