update
This commit is contained in:
@@ -5,7 +5,7 @@ import dayjs from "dayjs";
|
||||
const {time} = defineProps({
|
||||
time: {
|
||||
type: String,
|
||||
default: '2025-03-28 10:10:00',
|
||||
default: dayjs(new Date()).add(20, 'minutes'),
|
||||
}
|
||||
});
|
||||
|
||||
@@ -26,11 +26,11 @@ const timer = setInterval(() => {
|
||||
<view class="!flex items-center gap-[20rpx]">
|
||||
<slot></slot>
|
||||
<view class="!flex gap-[16rpx] items-center">
|
||||
<view class="time-block" v-if="hours">{{ hours < 10 ? `0${hours}` : hours }}</view>
|
||||
<view class="time-block" v-if="hours && hours>0">{{ hours < 10 ? `0${hours}` : hours }}</view>
|
||||
<view v-if="hours">:</view>
|
||||
<view class="time-block" v-if="minutes">{{ minutes < 10 ? `0${minutes}` : minutes }}</view>
|
||||
<view class="time-block" v-if="minutes && minutes>0">{{ minutes < 10 ? `0${minutes}` : minutes }}</view>
|
||||
<view v-if="minutes">:</view>
|
||||
<view class="time-block" v-if="seconds">{{ seconds < 10 ? `0${seconds}` : seconds }}</view>
|
||||
<view class="time-block" v-if="seconds && seconds>0">{{ seconds < 10 ? `0${seconds}` : seconds }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user