阅读背景:

react-navitve:使用swiper控件的时候,发现onIndexChanged无法触发

来源:互联网 
原代码:

//data_protion_list:网络数据
this.state = {
 
       
          data_protion_list:[],
        
        };


//render:

     <Swiper  
                                onIndexChanged = {this.onIndexChangedCenter.bind(this)}
                                ref="scrollView"
                                loop = {true}
                                key = {1000}
                                horizontal={true}
                                showsPagination = { false }
                                showsHorizontalScrollIndicator={false}
                                pagingEnabled={true}
                                >


                                {


                                 this.state.data_protion_list.map((key, i) =>


                                 this.renderPromotionView(key, i))


                                }      
                                </Swiper>    原代码:

//data_protion_list:网络数据
this.state = {
 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: