Mint UI组件Loadmore上拉加载一些问题

  1. 页面初始化会请求两次接口
    添加属性:auto-fill=“false”
  2. 兼容ios上拉加载失效1
(滚动的父元素添加样式)
.view {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  1. 兼容ios上拉加载失效2
<div ref='wrapper' :style="{height: iSiPhone? wrapperHeight + 'px' : ''}" :class="[iSiPhone?'iSiPhoneI':'iSiPhoneA']">
    // style="-webkit-overflow-scrolling: touch; overflow: scroll;" 
     <mt-loadmore :bottom-method="loadBottom" :bottom-all-loaded="bottomAllLoaded" ref="loadmore" :auto-fill="false" > </mt-loadmore>
</div>

 data(){
    return{
       wrapperHeight:'',
       iSiPhone: ''
    }
 }
 mounted(){
      // 判断安卓还是ios
      this.iSiPhone = navigator.userAgent.includes('iPhone')
      if(this.iSiPhone) {
        this.wrapperHeight = document.documentElement.clientHeight - this.$refs.wrapper.getBoundingClientRect().top;
      } else {
        return false
      }
    },
原创文章 3 获赞 2 访问量 476

猜你喜欢

转载自blog.csdn.net/Nlovely/article/details/105845719