wzl_amateur
wzl_amateur
  • 发布:2022-05-29 14:32
  • 更新:2022-05-29 14:32
  • 阅读:391

swiper切换后 uni-load-state的loadMore自动加载一次时什么原因

分类:nvue
请大神指点 在 nvue页面下 APP-PLUS swiper切换后 uni-load-state的loadMore自动加载一次时什么原因 <unicloud-db ref="udb" v-slot:default="{data,pagination,hasMore, loading, error, options}" :options="options" @error="onqueryerror" :collection="colList" :page-size="6" @load="handleLoad" > <swiper class="swiper" acceleration="linear" :style="{height:swiperHight}" :current="tabIndex" @change="onChange" :duration="1000" > <swiper-item class="swiper-item" v-for="(tabs,j) in tabars" :key="j"> <!-- #ifndef APP-PLUS --> <scroll-view id="dataList" scroll-with-animation @scrolltoupper="scrolltoupper" @scrolltolower="loadMore" show-scrollbar="false" :style="{height:data.length>2 ? scrollHight : '120Rpx'}" :scroll-y="true" show- scrollbar="false"> <!-- #endif -->
<uni-list class="uni-list" :border="false" :style="{height:listHight}">
<!-- #ifdef APP-NVUE -->
<refreshBox @refresh="refresh" :loading="loading"></refreshBox>
<!-- #endif -->
<!-- 列表渲染 -->
<uni-list-item :to="'/pages/list/detail?id='+item._id+'&title='+item.title" v-for="(item,index) in data" key="index"> <template v-slot:header>
<image class="avatar" :src="item.avatar" mode="aspectFill"></image>
</template>
<template v-slot:body>
<view class="main">
<text class="title">{{item.title}}</text>
<view class="info">
<text class="author">{{item.user_id[0]?item.user_id[0].username:''}}</text>
<uni-dateformat class="last_modify_date" :date="item.last_modify_date"
format="yyyy-MM-dd" :threshold="[60000, 2592000000]" />
</view>
</view>
</template>
</uni-list-item>
<!-- #ifdef APP-PLUS -->
<uni-list-item>
<template v-slot:body>
<!-- #endif -->
<uni-load-more :status="data,pagination,hasMore, loading, error" @loadMore="loadMore" />
<!-- #ifdef APP-PLUS -->
</template>
</uni-list-item>
<!-- #endif -->
</uni-list>
<!-- #ifndef APP-PLUS -->
</scroll-view>
<!-- #endif -->
</swiper-item>
</swiper>
</unicloud-db>
2022-05-29 14:32 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复