From f70b70eec5e1aa1428d3888233e259e8c52ce8b6 Mon Sep 17 00:00:00 2001 From: jack <jack.su@pollex.com.tw> Date: 星期五, 08 九月 2023 17:18:51 +0800 Subject: [PATCH] [UPDATE] 解決弱掃Information exposure to log file, 將印在log的私密資料移除 --- PAMapp/components/multiSelectBtn.vue | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/PAMapp/components/multiSelectBtn.vue b/PAMapp/components/multiSelectBtn.vue index 4ecd3c9..707a96f 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 { @@ -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