保誠-保戶業務員媒合平台
Tomas
2023-12-25 f065760fa7df1f88747395ab4b55349ce8b2faf0
PAMapp/components/singleSelectBtn.vue
@@ -20,8 +20,7 @@
<script lang="ts">
  import { Component, Prop, PropSync, Vue } from "nuxt-property-decorator";
  import * as _ from 'lodash';
  import { OptionBtnDto } from "~/shared/models/optionBtnDto.model";
  @Component
  export default class SingleSelectBtn extends Vue {
@@ -35,12 +34,7 @@
    //////////////////////////////////////////////////////////////////////
    patchValue(value: string | number): void {
      // 主要解決按鈕點擊兩次能回到,未點選的狀態
      this.syncSingleSelected = _.isEqual(this.syncSingleSelected, value) ? "" : value;
      this.syncSingleSelected = this.syncSingleSelected === value ? "" : value;
    }
  }
  export interface OptionBtnDto {
    title    : string,
    subTitle?: string,
    label    : string | number,
  }
</script>