uView2.0
uView2.0 copied to clipboard
countDown为什么不用slot scope导出值,而使用change事件?
这个功能解决了什么问题?
countDown用slot scope导出值不用再监听事件也可以实现高度的自定义
你期望的 API 是怎样的?
<u-count-down
:time="30 * 60 * 60 * 1000"
format="DD:HH:mm:ss"
autoStart
millisecond
>
<view class="time" v-slot:default="{timeData}">
<text class="time__item">{{ timeData.days }} 天</text>
<text class="time__item">{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}} 时</text>
<text class="time__item">{{ timeData.minutes }} 分</text>
<text class="time__item">{{ timeData.seconds }} 秒</text>
</view>
</u-count-down>