From bdae23a40c461c2c6b6ee614f661eac731c949c8 Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期三, 22 十二月 2021 14:12:05 +0800
Subject: [PATCH] Merge branch 'master' of https://192.168.0.10:8443/r/pcalife/PAM

---
 PAMapp/components/Ui/UiField.vue |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/PAMapp/components/Ui/UiField.vue b/PAMapp/components/Ui/UiField.vue
index 588af8d..df98f3c 100644
--- a/PAMapp/components/Ui/UiField.vue
+++ b/PAMapp/components/Ui/UiField.vue
@@ -13,9 +13,10 @@
 
 <script lang="ts">
 import { Vue, Component, Prop } from 'vue-property-decorator';
+import { isMobileDevice } from '~/shared/device';
 
 @Component
-export default class UiCarousel extends Vue {
+export default class UiField extends Vue {
 
   @Prop() span!: number;
   @Prop() icon!: string;
@@ -25,6 +26,10 @@
 
   currentDevice: 'MOBILE' | 'DESKTOP' = 'MOBILE';
 
+  mounted(): void {
+    this.currentDevice = isMobileDevice() ? 'MOBILE' : 'DESKTOP';
+  }
+
   get fieldSpan(): number {
     return this.span || 24;
   }

--
Gitblit v1.8.0