vue滚动条滚到到底部触发的方法


html

 <div style="height:200px;overflow-y:auto;" @scroll="scrollEvent">
                    <div class="people_list" :key="index" v-for="(item,index) in peoplelist">
                        <img class="people_list_header" :src="item.avatar" />
                        <div>
                            <span class="people_list_name">{{item.name}}</span>
                            <span v-show="item.identity_type==1" class="people_list_wechat">@微信</span>
                            <span v-show="item.identity_type==2" class="people_list_wechat">@企业微信</span>
                            <p class="people_list_time">添加时间:{{item.create_time}}</p>
                        </div>
                    </div>
                </div>

方法

//滚动条触发事件
        scrollEvent(e) {
            console.log(e)
            if (e.srcElement.scrollTop + e.srcElement.clientHeight == e.srcElement.scrollHeight ) {
                
            }
        },

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM