<div style="height:100vh;overflow: scroll;"> <mt-loadmore :top-method="loadTop" :bottom-method="loadBottom" :bottom-all-loaded="allLoaded" ref="loadmore" bottomPullText="上拉加載更多"> <ul> <li v-for="(item,index) in lists" style="height:40px;">{{ item }}</li> </ul> </mt-loadmore> </div>
1.必定要給<mt-loadmore>的父元素添加overflow:scroll屬性,否則上拉加載沒法使用。html