1.4.2 • Published 5 years ago

m-zhinanmao-component-count-timer v1.4.2

Weekly downloads
9
License
ISC
Repository
-
Last release
5 years ago

m-zhinanmao-component-count-timer

指南猫计数定时器组件

使用

// count-timer.ts
import CountTimer from 'm-zhinanmao-component-count-timer/lib/count-timer';

const countTimer = new CountTimer(CountTimer.TYPE.REMAIN);
const callback = () => {};

countTimer
  .setOrigin(Date.now())
  .setUnitArr(['秒', '分', '时', '天'])
  .setCallback(callback)
  .start();

countTimer.stop();
// WithCountTimer.tsx
import WithCountTimer from 'm-zhinanmao-component-count-timer';

<WithCountTimer origin={origin} type={WithCountTimer.TYPE.REMAIN}>
  {timeArr => (
    <div>{timeArr.map(n => n.value + n.unit).join('')}</div>
  )}
</WithCountTimer>

开始

yarn

yarn start

yarn compile

开发

查看 rc-tools

1.4.2

5 years ago

1.4.1

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago