微信小程序 懒加载
1.需要使用到 wx小程序中的 createIntersectionObserver , relativeToViewport ,observe 等一系列 API ,API使用方法详情 官网: https://developers.weixin.qq.com/miniprogram/dev/api/wxml/wx.createIntersectionObserver.html
2.实践:
// index.wxml
<view class="lazy-{
{index}}" wx:for="{
{newsLists}}" wx:key="index" >
<image src="{