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>
相关推荐
计算机学姐17 小时前
基于微信小程序的图书馆座位预约系统【uniapp+springboot+vue】
vue.js·spring boot·微信小程序·小程序·java-ee·uni-app·intellij-idea
中犇科技18 小时前
电商app源码系统推荐|开源 uniapp 商城系统
uni-app
海水冷却1 天前
uniapp 实现直播功能的完整方案与实战指南
uni-app
wuxianda10301 天前
Object-C/Swift/UniApp项目苹果商店上架3天极速解决方案汇报总结
ios·uni-app·objective-c·cocoa·苹果上架
WKK_1 天前
uniapp 微信小程序使用TextEncoder,arrayBufferToBase64
微信小程序·小程序·uni-app
喜崽1 天前
uniapp消息会话界面【消息组件一左一右】-01
uni-app
一渊之隔1 天前
uniapp蓝牙搜索连接展示蓝牙设备包含信号显示
前端·网络·uni-app·bluetooth
喜崽1 天前
uniapp消息会话界面【消息滚动到底部】-02
uni-app
Geek_Vison1 天前
三款小程序容器技术选型对比分析——融媒新闻APP如何进行技术选型~
小程序·uni-app·app开发·finclip·小程序开发平台·跨端开发·小程序容器
DK185838322522 天前
知识付费会员小程序/付费圈子系统——课程兑换码+会员体系完整实战,开源运营级方案
小程序·uni-app·开源·php