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>
相关推荐
小恒恒11 小时前
2025 Vibe Coding 有感
前端·uni-app·trae
一颗小青松12 小时前
uniapp使用uni-im
uni-app
2501_9160074715 小时前
iPhone APP 性能测试怎么做,除了Instruments还有什么工具?
android·ios·小程序·https·uni-app·iphone·webview
2501_9151063215 小时前
Windows 环境下有哪些可用的 iOS 上架工具, iOS 上架工具的使用方式
android·ios·小程序·https·uni-app·iphone·webview
一颗小青松18 小时前
uniapp vue3中app端使用腾讯云点播上传
uni-app·云计算·腾讯云
玄尺_00719 小时前
uniapp h5端使浏览器弹出下载框
前端·javascript·uni-app
2501_9151063219 小时前
iOS 抓包工具有哪些?不同类型的抓包工具可以做什么
android·ios·小程序·https·uni-app·iphone·webview
web前端神器1 天前
vue、uniapp项目循环中能显示每个列表的内容,但是点击的时候传递的参数却不正确
uni-app
ModyQyW1 天前
HBuilderX 4.87 无法正常读取 macOS 环境配置的解决方案
前端·uni-app
脾气有点小暴1 天前
Uni-app App 端自定义导航栏完整实现指南
uni-app