Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

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>

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

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

Successfully merging this pull request may close these issues.

None yet

2 participants