iscroll-luo icon indicating copy to clipboard operation
iscroll-luo copied to clipboard

上拉下拉时回调函数会执行多次

Open songshuzhong opened this issue 6 years ago • 2 comments

songshuzhong avatar Feb 20 '19 03:02 songshuzhong

你好, 我试了一下,貌似没发现这个问题。 能贴一下你的代码吗,或者可以检查一下代码里面是不是什么地方多次改变了数据

javaLuo avatar Feb 20 '19 05:02 javaLuo

renderContentItem(contentList) {
    return contentList.map(item =>
        <li key={item.vId}>
            <div className="v-p-b-content">
                <span className={this.renderStatusColor(item.status)}>{item.status}</span>
                <img src={item.coverUrl} alt="" onClick={() => this.gotoLandingPage(item.vId)} />
                <span className="v-p-b-c-time-length">{this.formatSecond(item.duration)}</span>
                <div className="content-index">
                    <p className="v-p-b-c-title">{item.title}</p>
                    <div className="v-p-b-c-item">
                        <span>{this.formatDate(item.releaseTime)}</span>
                        <Button className="v-p-b-time" size="mini" icon="more" onClick={() => this.props.showMenuList(true)}/>
                    </div>
                </div>
            </div>
            { 0? <div className="audit-msg">与百家号<a target="_blank" href="">&nbsp;已有文章&nbsp;</a>高度相似。</div>: null }
            { this.renderRejectReason(item.status, item.rejectReason) }
            { this.renderMoreInfo(item) }
        </li>
    );
}

render() { return( <div className="video-publish-wrapper"> <ReactIScroll id='iScroll' backgroundColor='#ECF6FD' fontColor='#2E40C1' onPullDownRefresh={() => this.updateContentList()} onPullUpLoadMore={() => this.retrieveMoreContentList()} options={{backgroundColor: 'white'}}> <ul className="video-publish-box"> { contentList? this.renderContentItem(contentList): null } </ReactIScroll> ); }

songshuzhong avatar Feb 20 '19 07:02 songshuzhong