From 995b09cc025beabfec2611d5ee698497d0e180f1 Mon Sep 17 00:00:00 2001 From: Cindy Chang Date: Fri, 9 Aug 2024 14:41:30 +0800 Subject: [PATCH] sonar 2 left --- src/components/durationjs.vue | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/durationjs.vue b/src/components/durationjs.vue index c6b03e3..2abbfdd 100644 --- a/src/components/durationjs.vue +++ b/src/components/durationjs.vue @@ -385,17 +385,13 @@ export default { if(totalSeconds >= this.maxTotal){ // 大於最大值時要等於最大值 totalSeconds = this.maxTotal; this.secondToDate(this.maxTotal, 'max'); - this.totalSeconds = totalSeconds; } else if (totalSeconds <= this.minTotal) { // 小於最小值時要等於最小值 totalSeconds = this.minTotal; this.secondToDate(this.minTotal, 'min'); - this.totalSeconds = totalSeconds; } else if((this.size === 'min' && totalSeconds <= this.maxTotal)) { this.maxDays = Math.floor(this.maxTotal / (3600 * 24)); - this.totalSeconds = totalSeconds; - } else { - this.totalSeconds = totalSeconds; - }; + } + this.totalSeconds = totalSeconds; this.$emit('total-seconds', totalSeconds); }, /**