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 ) {
}
},

浙公网安备 33010602011771号