Skip to content
This repository was archived by the owner on Aug 14, 2025. It is now read-only.

add getProgress feature#30

Open
YanYuanFE wants to merge 4 commits into
sambernard:masterfrom
YanYuanFE:yanyuan
Open

add getProgress feature#30
YanYuanFE wants to merge 4 commits into
sambernard:masterfrom
YanYuanFE:yanyuan

Conversation

@YanYuanFE

Copy link
Copy Markdown

No description provided.

@YanYuanFE

Copy link
Copy Markdown
Author
_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,
}

@diedu89

diedu89 commented Oct 15, 2018

Copy link
Copy Markdown

@sambernard any news on this PR?

@YanYuanFE

Copy link
Copy Markdown
Author

增加了加载图片获取进度的功能,修改了一些开发时的代码

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants