From 47e7e6f3d7b00b44a16eaeccb95a6a6a31790e05 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期一, 31 七月 2023 15:03:31 +0800 Subject: [PATCH] Update: 更新輪器圖檔 FILM_1 FILM_2 --- PAMapp/components/multiSelectBtn.vue | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/PAMapp/components/multiSelectBtn.vue b/PAMapp/components/multiSelectBtn.vue index d7d5fe4..707a96f 100644 --- a/PAMapp/components/multiSelectBtn.vue +++ b/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 @@ -45,6 +45,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; @@ -77,7 +88,7 @@ <style lang="scss" scoped> .pam-selectAll-btn{ - padding : 6px 20px; + padding : 10px 20px; border : 1px $LIGHT_GREY solid; background-color: $PRIMARY_WHITE; border-radius : 30px; -- Gitblit v1.8.0