CountDown 倒计时请使用手机扫码体验

基础用法

  1. html
    <nut-countdown
  2. :end-time="end"
  3. >
  4. </nut-countdown>

显示天

  1. html
    <nut-countdown
  2. :end-time="end"
  3. show-days
  4. >
  5. </nut-countdown>

以服务端的时间为准

  1. html
    <nut-countdown
  2. :start-time="serverTime"
  3. :end-time="end"
  4. show-days
  5. >
  6. </nut-countdown>

显示为 天时分秒

  1. html
    <nut-countdown
  2. show-days
  3. show-plain-text
  4. :end-time="end"
  5. >
  6. </nut-countdown>

异步更新结束时间

  1. html
    <nut-countdown
  2. show-days
  3. show-plain-text
  4. :end-time="asyncEnd"
  5. >
  6. </nut-countdown>

控制开始和暂停的倒计时

  1. html
    <nut-countdown
  2. :end-time="end"
  3. :paused="paused"
  4. >
  5. </nut-countdown>

Prop

字段说明类型默认值
start-time开始时间String, NumberDate.now()
end-time结束时间String, NumberDate.now()
show-days是否显示天Booleanfalse
show-plain-text显示为纯文本Booleanfalse
paused是否暂停Booleanfalse

Event

字段说明回调参数
on-end倒计时结束时剩余时间戳
on-paused暂停时剩余时间戳
on-restart暂停时剩余时间戳

CountDown 倒计时 - 图1