From efe605b99287617f9ff53e449c2e23949d2c9913 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期三, 27 四月 2022 16:34:12 +0800 Subject: [PATCH] fix#138195: 客戶接收到簡訊後,由以下連結重新預約,產生錯誤。 --- PAMapp/components/Ui/UiField.vue | 55 ++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 40 insertions(+), 15 deletions(-) diff --git a/PAMapp/components/Ui/UiField.vue b/PAMapp/components/Ui/UiField.vue index 588af8d..8845d85 100644 --- a/PAMapp/components/Ui/UiField.vue +++ b/PAMapp/components/Ui/UiField.vue @@ -3,7 +3,7 @@ v-if="fieldDisplayDevice === 'ALL' || fieldDisplayDevice === currentDevice"> <div class="pam-field__label"> - <div class="pam-field__title"><i :class="fieldIcon"></i>{{ fieldLabel }}</div> + <div class="pam-field__title" :style="{ 'font-size': fieldLabelSize }"><i :class="fieldIcon"></i>{{ fieldLabel }}</div> </div> <p class="pam-field__content"> <slot></slot> @@ -14,16 +14,36 @@ <script lang="ts"> import { Vue, Component, Prop } from 'vue-property-decorator'; -@Component -export default class UiCarousel extends Vue { +import UtilsService from '~/shared/services/utils.service'; - @Prop() span!: number; - @Prop() icon!: string; - @Prop() label!: string; - @Prop() content!: string; - @Prop() displayDevice!: 'MOBILE' | 'DESKTOP' | 'ALL'; +@Component +export default class UiField extends Vue { + + @Prop() + span!: number; + + @Prop() + icon!: string; + + @Prop() + label!: string; + + @Prop() + content!: string; + + @Prop() + labelSize?: number; + + @Prop() + displayDevice!: 'MOBILE' | 'DESKTOP' | 'ALL'; currentDevice: 'MOBILE' | 'DESKTOP' = 'MOBILE'; + + ////////////////////////////////////////////////////////////////// + + mounted(): void { + this.currentDevice = UtilsService.isMobileDevice() ? 'MOBILE' : 'DESKTOP'; + } get fieldSpan(): number { return this.span || 24; @@ -41,29 +61,34 @@ return this.displayDevice || 'ALL'; } + get fieldLabelSize(): string { + return (this.labelSize || 16) + 'px'; + } + } </script> - <style lang="scss" scoped> .pam-field { - display: flex; + display : flex; flex-direction: column; .pam-field__label { - display: flex; align-items: center; + display : flex; .pam-icon { font-size: 12px; } .pam-field__title { - font-size: 16px; - font-weight: bold; - display: flex; align-items: center; + display : flex; + font-weight: bold; } } .pam-field__content { - padding-top: 10px; + display : flex; + // padding-top: 10px; + white-space: pre-line; + line-height: 1.5; } } </style> -- Gitblit v1.8.0