uView2.0 icon indicating copy to clipboard operation
uView2.0 copied to clipboard

countDown为什么不用slot scope导出值,而使用change事件?

Open taoeer opened this issue 3 years ago • 0 comments

这个功能解决了什么问题?

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 }}&nbsp;天</text>
            <text class="time__item">{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}&nbsp;时</text>
            <text class="time__item">{{ timeData.minutes }}&nbsp;分</text>
            <text class="time__item">{{ timeData.seconds }}&nbsp;秒</text>
        </view>
    </u-count-down>

taoeer avatar Jul 20 '22 01:07 taoeer