<span class="van-count-down-box">
<van-count-down :time="overTime" />
</span>
获取时间,单位是毫秒,就不需要除以1000,
接口的时间,我这里格式是 2021-12-01 23:59:59
let endTime = new Date(接口的时间).getTime()
let start_time = new Date().getTime();
this.overTime = endTime - start_time;//时间戳
css修改:
/deep/.van-count-down-box{
.van-count-down{
font-size: 14px !important;
font-family: PingFang SC-Semibold, PingFang SC !important;
font-weight: 600 !important;
color: #FF521A !important;
line-height: 20px !important;
}
}