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); }, /**