wxc-countdown

Weex 倒计时组件

Demo

    

参数配置

PropTypeRequiredDefaultDescription
timeNumberY1501200000000最终时间戳
intervalNumberN1000间隔,单位为“毫秒”
tplStringN{h}:{m}:{s}展示模板
onCompleteFunctionN()=>()完成时调用的方法
timeWrapStyleObjectN-最外层包裹 style
timeBoxStyleObjectN-数字盒子 style
dotBoxStyleObjectN-符号盒子 style
timeTextStyleObjectN-数字文字 style
dotTextStyleObjectN-符号文字 style

使用方法

<template>
  <wxc-countdown tpl="{d}天{h}时{m}分{s}秒" :time="TIME"></wxc-countdown>
</template>
<script>
    import { WxcCountdown } from 'weex-ui'
    export default {
      components: { WxcCountdown },
      data: () => ({
        TIME: new Date().getTime() + 86400000 + ''
      })
    }
</script>

更详细代码可以参考 demo