Open YanYuanFE opened 6 years ago
_getProgress = (completedCount, total) => { const percent = (Math.round(completedCount/total * 10000)/100).toFixed(2) + '%' console.log(percent) }
<Preload images={images} onError={this._handleImageLoadError} onSuccess={this._handleImageLoadSuccess} getProgress={this._getProgress} mountChildren resolveOnError >
const propTypes = { // getProgress getProgress: PropTypes.func, }
@sambernard any news on this PR?
增加了加载图片获取进度的功能,修改了一些开发时的代码