1.0.0 • Published 6 years ago

react-native-loadview v1.0.0

Weekly downloads
5
License
ISC
Repository
github
Last release
6 years ago

react-native-loadview

基于React Native实现的界面加载组件,

Installation

npm install react-native-loadview --save

Import into your project

import LoadView from 'react-native-loadview';

Examle useage

用于界面数据处理load状态展示,目前支持两种gif加载方式

<LoadView style={Styles.loadView} visible={this.props.showIndicator} gif='triangles' />
<WebView
    source={{ uri: url }}
    onShouldStartLoadWithRequest={e => this.onShouldStartLoadWithRequest(e)}
    startInLoadingState
    onError={e => this.onError(e)}
    renderLoading={() => <LoadView/>}
    renderError={() => this.renderError()}
    onNavigationStateChange={e => this.onNavigationStateChange(e)}
/>

Properties

属性描述类型默认
iconSizegif大小PropTypes.number40
message加载文本PropTypes.string
visible是否显示PropTypes.booltrue
gifgif名称PropTypes.oneOf(["spinner", "triangles"])'spinner'