保誠-保戶業務員媒合平台
Mila
2021-12-29 cc663139f6abd63f7deac4739b63db754baf595c
PAMapp/components/Ui/UiField.vue
@@ -14,17 +14,34 @@
<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()
  displayDevice!: 'MOBILE' | 'DESKTOP' | 'ALL';
  currentDevice: 'MOBILE' | 'DESKTOP' = 'MOBILE';
  //////////////////////////////////////////////////////////////////
  mounted(): void {
    this.currentDevice = UtilsService.isMobileDevice() ? 'MOBILE' : 'DESKTOP';
  }
  get fieldSpan(): number {
    return this.span || 24;
  }