保誠-保戶業務員媒合平台
wayne
2022-01-26 6fa4bba623713c396432ba8b863846883d6a1906
PAMapp/components/multiSelectBtn.vue
@@ -25,7 +25,7 @@
</template>
<script lang="ts">
  import { Vue, Component, Prop, PropSync} from 'vue-property-decorator';
  import { Vue, Component, Prop, PropSync, Watch} from 'vue-property-decorator';
import { OptionBtnDto } from '~/shared/models/optionBtnDto.model';
  @Component
@@ -46,6 +46,17 @@
    @Prop({type:String,default:''})
    nameOfOtherOption!:string;
    @Prop()
    maxLength? : number;
    @Watch('syncMutiSelect')
    onMutiSelectChange(): void {
      if (!this.maxLength) return;
      if (this.syncMutiSelect.length > this.maxLength) {
        this.syncMutiSelect.shift();
      }
    }
    isSelectOtherOption=false;
    isSelectAll=false;