下拉的核心代码为:scrollFun(e) {constoffsetHeight= e.target.offsetHeightconstscrollHeight= e.target.scrollHeightconstscrollTop= e.target.scrollTopif((scrollHeight - (offsetHeight+scrollTop)) < 10){if(this.bottomMain){this.bottomMain = falsethis.addListDataFun()}}},addListDataFun(){this.$Spin.show({render: (h) => {return h('div', [h('Icon', {'class': 'demo-spin-icon-load',props: {type: 'ios-loading',size: 18}}),h('div', '数据更新中...')])}});setTimeout(() => {this.pbList = this.pbList.concat(this.addList)this.bottomMain = truethis.$nextTick(()=>{this.$refs.compList.waterFall("#tabContainer", ".tab-item")this.$Spin.hide()})},1000)}这里使用的是iView-UI的全局加载事件,如果你要用其他的UI框架,也可以自行修改到这里,所有的思路就结束了如果对您有所帮助,欢迎您点个关注,我会定时更新技术文档,大家一起讨论学习,一起进步 。

文章插图
【分享一个Vue实现图片水平瀑布流的插件】
经验总结扩展阅读
- 支付宝蚂蚁庄园11月10日正确答案分享
- 高铁一个小时能跑多少公里
- 童装有一个品牌叫什么兔的
- 手机qq怎样建群(如何建一个qq群)
- qq一个人怎么建群(一个qq群可以容纳多少人)
- AE模板怎么套
- 禁烟标识
- 怎样才能得知一个网站的或者网页的点击率
- 排骨要炖多长时间
- 抖音怎么分享团购链接赚佣金
