Skip to content

Conversation

@zqy233
Copy link
Contributor

@zqy233 zqy233 commented Mar 22, 2023

这个需求社区反馈的也挺多的:

https://ext.dcloud.net.cn/plugin?name=uni-countdown
希望时分秒也支持开关

只显示秒的用法:

 <uni-countdown :start="start" :second="40" :showDay="false" :showTime="{ hour: false, minute: false }" />

只显示分秒的用法:

 <uni-countdown :start="start" :second="40" :showDay="false" :showTime="{ hour: false }" />
@blackWins
Copy link
Contributor

或许可以考虑使用一个变量autoHideLeft来自动屏蔽左端为0的值.

例如 :0天00小时10分03秒,当:autoHideLeft="true"显示为:10分03秒

<text v-if="h>0" :style="[timeStyle]" class="uni-countdown__number">{{ h }}</text>

@zqy233
Copy link
Contributor Author

zqy233 commented Mar 29, 2023

或许可以考虑使用一个变量autoHideLeft来自动屏蔽左端为0的值.

例如 :0天00小时10分03秒,当:autoHideLeft="true"显示为:10分03秒

<text v-if="h>0" :style="[timeStyle]" class="uni-countdown__number">{{ h }}</text>

很好的主意,但是只显示时、只显示分的时候应该就不行了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants