From c0946457d311eb1ced63f7dcbcf4bc3f0e33c55a Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期三, 19 一月 2022 16:43:01 +0800 Subject: [PATCH] fixed: BackActionBar - 預約單結案後顯示的 lable 應為'結案明細' --- PAMapp/components/multiSelectBtn.vue | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/PAMapp/components/multiSelectBtn.vue b/PAMapp/components/multiSelectBtn.vue index d7d5fe4..0abc66e 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 @@ -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; -- Gitblit v1.8.0