迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:react-native-looped-carousel开源软件地址:https://gitee.com/timzaak/react-native-looped-carousel开源软件介绍:Looped carousel for React Native##注意:本fork,改掉了不少东西,让它用起来更像是jquery的轮播图。暂时没有翻页按钮这个功能,以后可能会依照react-native-carousel来实现翻页按钮。 Based on react-native framework (as of 0.11.2) by Facebook. DemoInstall$ npm install react-native-looped-carousel --save Usage'use strict';var React = require('react-native');var Carousel = require('react-native-looped-carousel');var Dimensions = require('Dimensions');var {width, height} = Dimensions.get('window');var { AppRegistry, StyleSheet, Text, View} = React;var carouselTest = React.createClass({ render: function() { return ( <Carousel delay={500} style={{width: width, height: height}}> <View style={{backgroundColor:'#BADA55',width:width,height:height}}/> <View style={{backgroundColor:'red',width:width,height:height}}/> <View style={{backgroundColor:'blue',width:width,height:height}}/> </Carousel> ); }});AppRegistry.registerComponent('carouselTest', () => carouselTest); Used inMore on react-native here: http://facebook.github.io/react-native/docs/getting-started.html#content ![]() |
请发表评论