Issue #79: Done.
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
<template>
|
||||
<div class=" relative">
|
||||
<div class="flex justify-center items-center gap-1 px-1 w-32 border border-neutral-500 cursor-pointer" @click="openTimeSelect = !openTimeSelect">
|
||||
<p>{{ days }}d</p>
|
||||
<p>{{ hours }}h</p>
|
||||
<p>{{ minutes }}m</p>
|
||||
<p>{{ seconds }}s</p>
|
||||
<div class="w-32 px-1 border border-neutral-500 cursor-pointer" @click="openTimeSelect = !openTimeSelect">
|
||||
<div v-if="totalSeconds === 0" class="text-center">
|
||||
<p>0s</p>
|
||||
</div>
|
||||
<div v-else class="flex justify-center items-center gap-1">
|
||||
<p>{{ days }}d</p>
|
||||
<p>{{ hours }}h</p>
|
||||
<p>{{ minutes }}m</p>
|
||||
<p>{{ seconds }}s</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="duration-container absolute left-0 top-full translate-y-2" v-show="openTimeSelect">
|
||||
<div class="duration-box" v-for="(unit, index) in inputTypes" :key="unit">
|
||||
@@ -285,9 +290,11 @@ 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 {
|
||||
this.totalSeconds = totalSeconds;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user