Package Exports
- react-native-progress-cus
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-progress-cus) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-native-progress-cus
基于react-native-progress@3.4.0进行修改的,基本遵循其属性和方法设定,主要修改一些方法和渲染逻辑
安装
npm i --save react-native-progress-cus
修改react-native-progress的内容
1.修改渲染逻辑
2.修改了Circle的formatText 使其可以传入自定义UI
3.增加属性isCenterDefaultUI:是否使用formatText的默认ui,默认是使用 true;否则false,自定义formatText的UI
使用isCenterDefaultUI和formatText (其他属性及使用方法,请查看react-native-progress@3.4.0)
import {
Circle
} from 'react-native-progress-cus';
<Circle size={this.getProgressSize()} // 圆的直径
style={styles.circleStyle}
progress={progress||0}
unfilledColor={unfilledColor} // 剩余进度的颜色
color={color}
thickness={this.getThickness()} // 内圆厚度
showsText={true}
isCenterDefaultUI={false}
formatText={this.renderItem}/>)