From a3716f72066d25d745f4d5103ff23a553c3e102b Mon Sep 17 00:00:00 2001
From: wayne <wayne8692wayne8692@gmail.com>
Date: 星期四, 17 二月 2022 11:41:19 +0800
Subject: [PATCH] Merge branch 'sit' into uat

---
 PAMapp/components/Ui/UiField.vue |   50 +++++++++++++++++++++++++++++++++++---------------
 1 files changed, 35 insertions(+), 15 deletions(-)

diff --git a/PAMapp/components/Ui/UiField.vue b/PAMapp/components/Ui/UiField.vue
index 5d5ee7b..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>
@@ -13,21 +13,36 @@
 
 <script lang="ts">
 import { Vue, Component, Prop } from 'vue-property-decorator';
-import { isMobileDevice } from '~/assets/ts/device';
+
+import UtilsService from '~/shared/services/utils.service';
 
 @Component
 export default class UiField extends Vue {
 
-  @Prop() span!: number;
-  @Prop() icon!: string;
-  @Prop() label!: string;
-  @Prop() content!: string;
-  @Prop() displayDevice!: 'MOBILE' | 'DESKTOP' | 'ALL';
+  @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 = isMobileDevice() ? 'MOBILE' : 'DESKTOP';
+    this.currentDevice = UtilsService.isMobileDevice() ? 'MOBILE' : 'DESKTOP';
   }
 
   get fieldSpan(): number {
@@ -46,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