<scroll-view scroll-y style="height: 100%" scroll-anchoring scroll-with-animation enable-back-to-top
refresher-enabled :refresher-threshold="100" :refresher-triggered="isRefresher"
@refresherrefresh="onRefresherrefresh" :lower-threshold="200" @scrolltolower="getMoreList"></scroll-view>

- 发布:2025-05-30 14:25
- 更新:2025-06-24 15:39
- 阅读:80
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win10
HBuilderX类型: 正式
HBuilderX版本号: 4.24
第三方开发者工具版本号: 1.06.2503281
基础库版本号: 3.8.1
项目创建方式: HBuilderX
示例代码:
操作步骤:
苹果手机,进入列表页面,视图会停留在第一页最后的列表数据,然后会自动加载第二页
苹果手机,进入列表页面,视图会停留在第一页最后的列表数据,然后会自动加载第二页
预期结果:
进入列表页面,滚动条应该在最顶部并且只加载第一页数据
进入列表页面,滚动条应该在最顶部并且只加载第一页数据
实际结果:
进入列表页面,会自动滚动到第一页最后一条数据并且加载了第二页数据
进入列表页面,会自动滚动到第一页最后一条数据并且加载了第二页数据
bug描述:
列表中使用scroll-view,滚动触底会加载下一页,但是在苹果手机上一进入页面没有手动滚动,但是会自动触底加载下一页
1***@qq.com (作者)
在微信开发工具上没有这个问题,但是用苹果手机预览就会复现
2025-07-16 15:40
1***@qq.com (作者)
<template>
<view class="release boxs">
<view class="release-top">
<search-view @changeInput='searchEvent'></search-view>
</view>
<view class="release-main">
<view class="release-cons boxs">
<scroll-view scroll-y="true" style="height: 100%" scroll-anchoring scroll-with-animation
enable-back-to-top refresher-enabled :refresher-threshold="100" :refresher-triggered="isRefresher"
@refresherrefresh="onRefresherrefresh" :lower-threshold="200" @scrolltolower="getMoreList">
<view class="release-cons-list boxs" v-for="(item,index) in communiteList" :key="index"
@click="gotoDe(item)">
<view class="list-title yd-flex-h-hS-vC">
<view class="list-title-l yd-flex-h-hL-vC">
<text class="span yd-clamp-1">{{item.subjectName}}</text>
<text class="title yd-clamp-1">{{item.title}}</text>
</view>
<view class="list-title-r yd-flex-h-hC-vC" @click.stop="openPopup(item)"
v-if="hasPer(['publish:info:remove'])">
<i class="iconfont LTa-19"></i>
</view>
</view>
<view class="list-content yd-clamp-4">
{{$globalMethod.stripHtmlTags(item.content)}}
</view>
<view class="list-text">
<text class="text1 boxs yd-clamp-1">{{item.companyName}}</text>
<text class="yd-clamp-1" v-if="item.createBy">{{item.createBy}}</text>
<text
class="yd-clamp-1">{{$globalMethod.arrayLookup(staticData.user_identity,'value',item.createByIdentity,'label')}}</text>
</view>
<view class="list-last yd-flex-h-hS-vC">
<view class="list-last-l yd-flex-h-hL-vC">
<view class="yd-flex-h-hL-vC l-li">
阅读
<text class="l-li-text">{{item.browseNum}}</text>
</view>
<view class="yd-flex-h-hL-vC l-li">
转发
<text>{{item.transferNum}}</text>
</view>
<view class="yd-flex-h-hL-vC l-li">
评论
<text>{{item.commentCount}}</text>
</view>
</view>
<view class="list-last-r yd-flex-h-hR-vC">
{{item.createTime}}
</view>
</view>
</view>
<no-list v-if="communiteList.length <=0 && loadStatus != 'loading'"></no-list>
<view style="padding: 20rpx 0 50rpx" v-else>
<u-loadmore fontSize="28rpx" iconSize="17px" line :status="loadStatus" />
</view>
</scroll-view>
</view>
<!-- 发布按钮 -->
<view class="low-btn" @click="gotoAddPublish" v-if="hasPer(['publish:info:add'])">
<view class="yd-flex-v-hC-vC" style="width: 100%; height: 100%;">
<i class="iconfont LTa-11"></i>
<text>发布</text>
</view>
</view>
</template>
<script>
import {
getPublishListAPI,
getPublishCountAPI,
deletePublishAPI
} from '@/api/index/publish.js'
import {
getMinePublishsAPI,
getOwnPublishCountAPI
} from '@/api/index/mine.js'
import searchView from '@/components/search/index.vue';
import releasePopupVue from './components/releasePopup.vue';
import {
useGetDictData
} from '@/utils'
const dictTypeList = ['user_identity']
</script>
<style scoped lang="less">
.release {
width: 100%;
height: 100vh;
</style>
2025-07-16 15:42