美文网首页
React Native listview 使用详解

React Native listview 使用详解

作者: 楚怀哲 | 来源:发表于2016-10-11 15:34 被阅读0次

    initialListSize={20} // 指定在组件刚挂载的时候渲染多少行数据

    pageSize={10} // 每次事件循环渲染的行数

    scrollRenderAheadDistance={50} // 当一行接近屏幕范围多少像素之内的时候开始渲染改行

    removeClippedSubviews={true} // 用于提升大列表的滚动性能(需要给行容器添加样式overflow:'hidden')默认开启

    dataSource={ds.cloneWithRowsAndSections(this.state.datas.lists)} // 渲染的数据聚合

    renderRow={this._renderList} // 单一条数模板

    minPulldownDistance={30} // 最新下拉长度

    renderFooter={this.renderFooter} // 渲染页脚

    onEndReached={this.onEndReached} // 当所有数据已经渲染过,并且列表被滚动到距离底部不足100像素距离时调用

    onEndReachedThreshold={100} // 调用onEndReached之前的临界值,单位是像素

    refreshControl={

    refreshing={this.state.isRefreshing} //是否显示指示器

    onRefresh={this._reloadLists} // 刷新时调用的方法

    tintColor= "#fff" // 指示器颜色

    title="正在拉取数据..."

    />

    }

    />

    相关文章

      网友评论

          本文标题:React Native listview 使用详解

          本文链接:https://www.haomeiwen.com/subject/roivyttx.html