From 873bb61290fadf81f3ebbe0bab04bb1b0cc82013 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期二, 04 一月 2022 17:24:31 +0800
Subject: [PATCH] Update:保戶個人帳號設定 增加成功提醒popup

---
 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 4ecd3c9..0abc66e 100644
--- a/PAMapp/components/multiSelectBtn.vue
+++ b/PAMapp/components/multiSelectBtn.vue
@@ -25,8 +25,8 @@
 </template>
 
 <script lang="ts">
-  import { Vue, Component, Prop, PropSync} from 'vue-property-decorator';
-  import { OptionBtnDto } from './singleSelectBtn.vue';
+  import { Vue, Component, Prop, PropSync, Watch} from 'vue-property-decorator';
+import { OptionBtnDto } from '~/shared/models/optionBtnDto.model';
 
   @Component
   export default class MultiSelectBtn extends Vue {
@@ -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