账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    mintui 上拉加载的时候不执行,然后整个页面卡死
    6
    0

    1-tab页,么个页面都用到了上拉刷新下拉加载

    2-下拉刷新可以实现,但是下拉加载就页面卡死不动,也没有执行下拉加载的函数

    <template>
    <div ref='PlayerWrap' :style="{ height: (tabPlayer.wrapperHeight-30) + 'px' }" class="member-box">

    <mt-loadmore class="news_list" :top-method="loadTopPlayer" :bottom-method="loadBottomPlayer" ref="loadmorePlayer" :bottom-all-loaded="tabPlayer.allLoaded" :autoFill='tabPlayer.autoFill'>
      <div class="player-item disFlex flex-wrap" :style="{ height: (wrapperHeight-50) + 'px' }" ref='playerWrap'>
        <div class="item disFlex flexCenter flex-colum flex-pack-justify" v-for='(item,index) in playerList' :key='index'>
          <div class="item-in">
            <div class="top">
              <img :src="baseImgUrl +  item.avator" alt="" class="avator">
              <p class="num">{{ item.number }}</p>
              <div class="bond" v-if="item.is_admin =='4'"> <span>c</span> <img src="../assets/images/tournaments/limited_red.png" alt=""> </div>
              <div class="bond" v-if='item.is_admin=="2"'> <span>c</span><img src="../assets/images/tournaments/limited_green.png" alt=""></div>
            </div>
            <div class="bottom size-box">
              <p>{{item.name }}</p>
              <p>体育主管</p>
            </div>
          </div>
        </div>
        
        
    data数据:
     tabPlayer: {
        allLoaded: false,
        autoFill: true,
        isPull: false,
        wrapperHeight: 0,
      },
      
      methods 方法:
         loadTopPlayer () {
      this.firstPlayerloader();
      this.$refs.loadmorePlayer.onTopLoaded();
    },
    loadBottomPlayer () {
      this.MorePlayerloader();
      this.$refs.loadmorePlayer.onBottomLoaded();
    },
    firstPlayerloader (id, page = 1, search = '') {
      var that = this;
      id = this.insId
      page = this.page
      search = this.playerSearch
      filter = this.filter
      this.$axios(
        this.httpInstitutionUrl + this.afterurl.institutionTeamMember, {
          id,
          page,
          search,
        },
        'get'
      ).then((res) => {
        if (res.data.code == 0) {
          this.playerList = res.data.data.member
          this.playerCount = res.data.data.count
          localStorage.setItem('playerId', this.playerCount)
          this.$nextTick(() => {
            if (res.data.data.member.length == 20) {
              that.tabPlayer.allLoaded = false;
            } else {
              that.tabPlayer.allLoaded = true;
            }
            // that.isPull = true;
            this.$refs.loadmorePlayer.onTopLoaded();
          });
        }
      }).catch((err) => {
        console.log(err);
    
      })
    },
    // 加载更多
    MorePlayerloader (id, page = 1, search = '', filter) {
      console.log(111); //不执行
      var that = this;
      id = this.insId
      search = this.playerSearch
      page = this.page
      filter = this.filter
      this.$axios(
        this.httpInstitutionUrl + this.afterurl.institutionTeamMember, {
          id,
          page,
          search,
          filter,
        },
        'get'
      ).then((res) => {
        if (res.data.code == 0) {
          let data = this.playerList
          data.push(...res.data.data.member)
          this.playerList = data
          console.log('more', this.playerList);
          // 数据渲染成功后,隐藏下拉刷新的状态
          this.$nextTick(() => {
            if (res.data.data.member.length == 20) {
              that.tabPlayer.allLoaded = false;
              this.page = this.page + 1;
            } else {
              that.tabPlayer.allLoaded = true
              this.$refs.loadmorePlayer.onBottomLoaded();
            }
            that.isPull = false;
          });
        }
      }).catch((err) => {
        console.log(err);
    
      })
    
    0
    打赏
    收藏
    点击回答
    您的回答被采纳后将获得:提问者悬赏的 11 元积分
        全部回答
    • 0
    更多回答
    扫一扫访问手机版

    回答动态

    师傅被妖怪抓走了:发布了悬赏问题火爆全网的“元宇宙”到底是什么?预计能赚取 1积分收益
    酒后略带风情:发布了悬赏问题Android内存中Graphics与Code占用过高预计能赚取 10积分收益
    扛起拖把扫天下:发布了悬赏问题typescript如何导出接口配置?求解,谢谢!预计能赚取 10积分收益
    发布了悬赏问题Vue 如何改变返回页面的路径?如让B页面只能返回到A页面.预计能赚取 11积分收益
    发布了悬赏问题vue H5移动端;底部bottom固定定位,安卓弹起键盘导致页面变形如何解决?预计能赚取 10积分收益
    发布了悬赏问题请问为什么tomcat8.5 GET请求中文正常,POST请求还需要设置UTF-8.预计能赚取 10积分收益
    发布了悬赏问题vue2.5+ts创建以及引入jq的方法预计能赚取 11积分收益
    情场浪女:发布了悬赏问题import ggplot时报错module 'pandas' has no attribute 'tslib'预计能赚取 10积分收益
    见心书画许老师18753375161:发布了悬赏问题echarts3 legend禁止点击事件,允许悬浮事件预计能赚取 11积分收益
    aa_92cb0bd09f:发布了悬赏问题codewar上的一个问题预计能赚取 11积分收益