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>
相关推荐
00后程序员张1 小时前
HTTPS单向认证、双向认证、抓包原理与反抓包策略详解
网络协议·http·ios·小程序·https·uni-app·iphone
h_65432102 小时前
uniapp-APP端获取拍照时的方向角,同一位置横竖屏拍方向角一致
uni-app
梦梦代码精3 小时前
LikeShop按摩到家系统:2026年本地生活创业新风口,上门服务O2O源码私有化部署实战
大数据·docker·小程序·uni-app·生活·高并发·开源软件
这是个栗子5 小时前
【uni-app微信小程序问题解决】Uni-app 微信小程序组件不渲染
微信小程序·小程序·uni-app
梦梦代码精6 小时前
LikeShop开源多端商城系统:半年使用记录
git·uni-app·github
梦梦代码精1 天前
深度拆解:上门按摩系统如何成为本地生活“到家时代”的新引擎?
docker·小程序·uni-app·开源·生活·开源软件
编程猪猪侠1 天前
uni-app微信小程序车牌号输入组件实现
微信小程序·uni-app
h_65432101 天前
uniapp的app/h5实现地图连续定位
uni-app
真的不想写实验1 天前
uniapp上传文件的载荷是个空对象
前端·uni-app
乌托邦2 天前
uni-mini-ci:让 uniapp 小程序构建后自动预览和上传
前端·vue.js·uni-app