react实现轮播图,以及实现绑定组件。
react实现轮播图,以及实现绑定组件。绑定组件://创建一个变量, 与某个组件绑定fl = React.createRef();在html中创建ref={this.fl},在函数中操作:this.fl.current.scrollToIndex({index: this.current})具体看以下代码// rncimport React, {Component} from 'react';import {Dimensions, FlatList, Image, Text, View}
原创
2021-04-25 17:26:57 ·
347 阅读 ·
0 评论