react-native-CountDowntimer,
只需要添加一个结束时间的倒计时控件,适用于秒杀的商品列表页面,欢迎围观,
欢迎star。https://github.com/jackuhan/react-native-CountDowntimer
开源项目地址: https://github.com/jackuhan/react-native-CountDowntimer
(一).项目介绍
在开发电商相关的APP的时候,经常会有秒杀,团购的倒计时的需求,这边跟大家推荐一个开源的倒计时组件。该只需要添加一个结束时间。适用于商品秒杀页面等等。
刚创建的React Native交流十群:157867561,欢迎各位大牛,React Native技术爱好者加入交流!同时博客右侧欢迎微信扫描关注订阅号,移动技术干货,精彩文章技术推送!
(二).部分效果
(三).使用方法
date
iso 格式 或者 js dates格式的结束时间。
使用demo
import CountDown from './CountDownReact'
<CountDown
//date={new Date(parseInt(endTime))}
date="2017-11-28T00:00:00+00:00"
days={{plural: 'Days ',singular: 'day '}}
hours=':'
mins=':'
segs=''
daysStyle={styles.time}
hoursStyle={styles.time}
minsStyle={styles.time}
secsStyle={styles.time}
firstColonStyle={styles.colon}
secondColonStyle={styles.colon}
/>