CustomerInfoSkeleton.vue
63 lines
| 1 | <template> |
| 2 | <el-skeleton v-show="loading" animated class="am-skeleton-ci"> |
| 3 | <template #template> |
| 4 | <div v-for="item in new Array(10)" :key="item" class="am-skeleton-ci__inner"> |
| 5 | <el-skeleton-item class="am-skeleton-ci__label" variant="text" /> |
| 6 | <el-skeleton-item class="am-skeleton-ci__input" variant="text" /> |
| 7 | </div> |
| 8 | </template> |
| 9 | </el-skeleton> |
| 10 | </template> |
| 11 | |
| 12 | <script setup> |
| 13 | // * Import from Vue |
| 14 | import { computed } from 'vue' |
| 15 | |
| 16 | // * Import from Store |
| 17 | import { useStore } from 'vuex' |
| 18 | |
| 19 | const store = useStore() |
| 20 | |
| 21 | let bookableType = computed(() => store.getters['bookableType/getType']) |
| 22 | |
| 23 | let loading = computed(() => { |
| 24 | if (bookableType.value === 'event') { |
| 25 | return store.getters['getLoading'] |
| 26 | } |
| 27 | |
| 28 | return store.getters['booking/getLoading'] |
| 29 | }) |
| 30 | </script> |
| 31 | |
| 32 | <style lang="scss"> |
| 33 | .amelia-v2-booking #amelia-container { |
| 34 | .am-skeleton-ci { |
| 35 | &__inner { |
| 36 | display: inline-flex; |
| 37 | flex-direction: column; |
| 38 | width: calc(50% - 8px); |
| 39 | margin-bottom: 24px; |
| 40 | |
| 41 | &:nth-child(odd) { |
| 42 | margin-right: 8px; |
| 43 | } |
| 44 | |
| 45 | &:nth-child(even) { |
| 46 | margin-left: 8px; |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | &__label { |
| 51 | height: 20px; |
| 52 | width: 65%; |
| 53 | margin-bottom: 6px; |
| 54 | } |
| 55 | |
| 56 | &__input { |
| 57 | height: 40px; |
| 58 | width: 100%; |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | </style> |
| 63 |