uniapp 解决scroll-view组件 refresher-triggered刷新无效

直接上代码 看代码注释

javascript 复制代码
	const isRefresh = ref(false); //下拉刷新状态
		// 下拉刷新
	async function refresherpulling() {
		renderArr.value = [];
		isRefresh.value = true; // 先赋为true 调用完接口再设为false
		await reqData();
		isRefresh.value = false; // 重置状态
	}

下面是组件视图

主要属性

  1. refresher-enabled 开起刷新
  2. refresher-triggered 下拉刷新状态
  3. @refresherrefresh 下拉刷新事件
javascript 复制代码
<view class="img_box">
		<scroll-view class="scrollView" scroll-y refresher-enabled @scrolltolower="getNext"
			:refresher-triggered="isRefresh" @refresherrefresh="refresherpulling">
			<view class="one_img" v-for="(item,index) in renderArr" :key="item._id" @click="toView(item)">
				<view class="aut">
					{{ item.author }}
				</view>
			</image>
			</view>
	
		</scroll-view>
	</view>
相关推荐
fruge6 小时前
华玥组件库 · 为 uni-app 打造的新一代高效组件解决方案
uni-app
遗憾随她而去.19 小时前
uniapp 折叠动画 <transition> 踩坑记录
css·uni-app
百锦再1 天前
Elements Plus 跨设备自适应显示问题综合解决方案
python·flutter·小程序·uni-app·k8s·tornado·net
坚持学习前端日记1 天前
UniApp APK打包与Android深度集成能力解析
android·vue.js·uni-app
wetyuo2 天前
【随手记】uniapp + V3 使用TailwindCss3
uni-app·vue·css3·vite
小恒恒4 天前
2025 Vibe Coding 有感
前端·uni-app·trae
一颗小青松4 天前
uniapp使用uni-im
uni-app
2501_916007474 天前
iPhone APP 性能测试怎么做,除了Instruments还有什么工具?
android·ios·小程序·https·uni-app·iphone·webview
2501_915106324 天前
Windows 环境下有哪些可用的 iOS 上架工具, iOS 上架工具的使用方式
android·ios·小程序·https·uni-app·iphone·webview
一颗小青松4 天前
uniapp vue3中app端使用腾讯云点播上传
uni-app·云计算·腾讯云