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>
相关推荐
2501_915106322 小时前
当 Perfdog 开始收费之后,我重新整理了一替代方案
android·ios·小程序·https·uni-app·iphone·webview
2501_915918415 小时前
中小团队发布,跨平台 iOS 上架,证书、描述文件创建管理,测试分发一体化方案
android·ios·小程序·https·uni-app·iphone·webview
家里有只小肥猫5 小时前
uniApp打包ios报错
ios·uni-app
jingling5557 小时前
uniapp | 基于高德地图实现位置选择功能(安卓端)
android·前端·javascript·uni-app
某公司摸鱼前端7 小时前
前端一键部署网站至服务器FTP
前端·javascript·uni-app
爱怪笑的小杰杰7 小时前
UniApp 桌面应用实现 Android 开机自启动(无原生插件版)
android·java·uni-app
m0_647057967 小时前
uniapp使用rich-text流式 Markdown 换行问题与解决方案
前端·javascript·uni-app
木子啊8 小时前
Uni-app导航栏适配终极避坑指南
uni-app·自定义导航栏·导航栏
2501_915106328 小时前
iOS 如何绕过 ATS 发送请求,iOS调试
android·ios·小程序·https·uni-app·iphone·webview
行走的陀螺仪19 小时前
uni-app + Vue3编辑页/新增页面给列表页传参
前端·vue.js·uni-app