Skip to content

slowsay/react-native-listview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 

Repository files navigation

react-native-listview

listview是react native中上拉翻页插件

NPM

install

npm install --save react-native-listview

example

'use sturct';
import React,{Component} from 'react';
import {View,Text,StyleSheet,Image,TouchableOpacity} from 'react-native';
import Listv from 'react-native-listview';
/**
 *@decsription 组件
 */
import Util from './../core/utils';


export default class extends Component {
    render() {
     const {navigator}=this.props;
        return (<View style={styles.container}>
            <Listv pagesize={5}
                   component={NewsContent}
                   navigator={navigator}
                   url='http://o9ji2nqbn.bkt.clouddn.com/news.json'/>
        </View>);
    }
}
const styles = StyleSheet.create({
    container: {
        width: Util.size.width, height: Util.size.height - 50,
        backgroundColor: '#eee'
    }
    })

API

pagesize

每页条数

navigator{...props}

组件导航继承,没有这个无法进入子页面操作,会报bug,

url

数据源地址,可以异步,里面封装fetch

onEndReachedThreshold

离底部距离,默认0

version

  • v0.0.15 update

About

listview是react native中上拉翻页插件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published