dianrong-react-native-banner
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

example:

import DRMBanner from 'dianrong-react-native-banner'

<DRMBanner showsButtons={false} autoplay={true} images={images} texts={texts} model={models} index={1} mageParameter='image' textParameter='text' bannerStyle='modelImageAndText' style={{ width: Dimensions.get('window').width, height: 300 }} paginationStyle={{ top: 300 * 0.85 * -1}} onItemTapped={(object, index)=>{ alert('点击了第' + index + '张图片', object[this.props.imageParameter]); }}

description:

DRMBanner 可以设置属性:

autoplay:设置banner是否可以自动播放 dotColor:设置普通状态下点的颜色,也可以通过 dotStyle 来设置整个 style activeDotColor:设置选中状态下点的颜色,也可以通过 activeDotStyle 来设置整个 style showButtons:是否显示左右移动的切换按钮,bool值 paginationStyle:设置banner点的整体style,可以通过设置top的位置来调整起始高度 index:设置banner的起始图片,比如index=1,则从第二张图开始 bannerStyle:分为modelImageAndText和imageAndText两个style,imageAndText传入普通的图片和文字数组进行渲染(不传文字数组则不显示文字),modelImageAndText为传入model,通过mageParameter和textParameter来指定对应的图片和文字字段。 onItemTapped:图片点击事件

Readme

Keywords

Package Sidebar

Install

npm i dianrong-react-native-banner

Weekly Downloads

1

Version

1.2.0

License

ISC

Last publish

Collaborators

  • morily