2***@qq.com
2***@qq.com
  • 发布:2019-12-05 22:06
  • 更新:2020-07-20 17:40
  • 阅读:1918

nvue子组件中使用scroll-view组件scrolltolower回调不会触发

分类:nvue

nvue子组件中使用scroll-view组件scrolltolower回调不会触发

Detail.nvue中引入CommentListView.nvue

<template>  
    <view class="CommentListLayout" :class="mCommentList.length > 0 ? '' : 'EmptyListLayout'">  
        <template v-if="mCommentList.length > 0">  
            <!-- #ifdef APP-NVUE -->  
            <list class="scroll-v list" enableBackToTop="true" scroll-y loadmoreoffset="15" @loadmore="loadMore(index1)">  
                <refresh class="refresh" @refresh="onrefresh(index1)" @pullingdown="onpullingdown" :display="refreshing ? 'show' : 'hide'">  
                    <div class="refresh-view">  
                        <image class="refresh-icon" :src="refreshIcon" :style="{width: (refreshing || pulling) ? 0: '30px'}"  
                         :class="{'refresh-icon-active': refreshFlag}"></image>  
                        <loading-indicator class="loading-icon" animating="true" v-if="refreshing"></loading-indicator>  
                        <text class="loading-text">{{refreshText}}</text>  
                    </div>  
                </refresh>  
                <cell v-for="(bean,index2) in mCommentList" :key="bean.id">  
                    <CommentItemView :index="index2" :databean="bean" @close="dislike(index1,index2)" @click="goDetail(bean)"></CommentItemView>  
                </cell>  
                <cell class="loading-more" v-if="isLoading || mCommentList.length > 4">  
                    <text class="loading-more-text">{{loadingText}}</text>  
                </cell>  
            </list>  
            <!-- #endif -->  
            <!-- #ifndef APP-NVUE -->  
            <scroll-view class="scroll-v list" enableBackToTop="true" scroll-y @scrolltolower="loadMore(index1)">  
                <view v-for="(bean,index2) in mCommentList" :key="bean.id">  
                    <CommentItemView :index="index2" :databean="bean" @close="dislike(index1,index2)" @click="goDetail(bean)"></CommentItemView>  
                </view>  
                <view class="loading-more" v-if="isLoading || mCommentList.length > 4">  
                    <text class="loading-more-text">{{loadingText}}</text>  
                </view>  
            </scroll-view>  
            <!-- #endif -->  
        </template>  

        <template v-else>  
            <view>  
                <image class="empty_layout_image" src="/static/mipmap/empty_data2.png" mode=""></image>  
                <text class="empty_text_view">还没有人评论哦</text>  
            </view>  
        </template>  
    </view>  
</template>

目前还没在android真机上调试,在H5里面不进scrolltolower方法

2019-12-05 22:06 负责人:无 分享
已邀请:
2***@qq.com

2***@qq.com

到处都是bug,半年了这个问题还在

笑望哥

笑望哥

问题解决了。回调方法要写在methods中,没注意copy的时候放错位置了

该问题目前已经被锁定, 无法添加新回复