Skip to content

✨feat: feat(uni-countdown): 新增showTime对象参数-控制时分秒的单独显示 #724

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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>

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants