scroll-view滚动到底部有时候不触发scrolltolower事件,会出现卡死的情况 安卓大部分机型 都可以滑出来 华为mete30pro比较容易触发
下面是组件代码
<template>
<scroll-view
class="i-scroll-view"
:style="scrollStyle"
scroll-y
refresher-enabled
:refresher-triggered="refresherTrigger"
@refresherrefresh="onRefresherpulling"
@scrolltolower="emits('scrolltolower')"
lower-threshold="150"
>
<view>
<slot />
<iLoadMore v-if="props.showLoadMore" :status="props.status" :nodataText="nodataText" :nomoreText="nomoreText" />
</view>
</scroll-view>
</template>
<script setup lang="ts">
import { ref } from "vue"
import iLoadMore from "@/components/iLoadMore/index.vue"
const props = defineProps({
scrollStyle: {
type: String,
default: ''
},
status: {
type: String,
default: 'loading'
},
showLoadMore: {
type: Boolean,
default: true
},
nodataText: {
type: String,
default: ''
},
nomoreText: {
type: String,
default: '没有更多宝贝了~'
}
})
const emits = defineEmits(['onPulling', 'scrolltolower'])
const refresherTrigger = ref<boolean>(false)
async function onRefresherpulling() {
refresherTrigger.value = true
emits('onPulling', function() {
refresherTrigger.value = false
})
}
</script>
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
楼主后面解决了吗?感觉大部分Android机型都有这个问题