<template>
<view class="page" :style="{color: fontColor}">
<view class="title" v-if="!isStart">
距离开始:
</view>
<view class="title" v-else>
距离结束:
</view>
<view class="days">
{
{time.day || '00'}}天
</view>
<view class="hour">
{
{time.hour || '00'}}时
</view>
<view class="minutes">
{
{time.min || '00'}}分
</view>
<view class="security">
{
{time.sec || '00'}}秒
</view>
</view>
</template>
<script>
export default {
data () {
return {
time: {},
isStart: false,
}
},
props: {
start_time: String,
end_time: String,
fontColor: String
},
mounted() {
this.countDown()
},
methods: {
timeF
uni-app 倒计时组件
最新推荐文章于 2024-06-17 22:05:08 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)