From 6ab892c3b400d072845fe1a9bbe7669e41c0ac4e Mon Sep 17 00:00:00 2001 From: zealotchen <92966734+zealotchen0@users.noreply.github.com> Date: Fri, 13 Sep 2024 16:24:20 +0800 Subject: [PATCH] feat(vue): support ul refresh scroll (#4032) * feat(vue-next): fix beforeLoadStyle not work * feat(vue): support_ul_refresh_scroll --- .../hippy-vue-native-components/src/ul-refresh.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/hippy-vue-native-components/src/ul-refresh.js b/packages/hippy-vue-native-components/src/ul-refresh.js index 0a01fedc485..3f4f5223b04 100644 --- a/packages/hippy-vue-native-components/src/ul-refresh.js +++ b/packages/hippy-vue-native-components/src/ul-refresh.js @@ -24,6 +24,17 @@ function registerUlRefresh(Vue) { Vue.registerElement('hi-ul-refresh-wrapper', { component: { name: 'RefreshWrapper', + processEventData(event, nativeEventName, nativeEventParams) { + switch (nativeEventName) { + case 'onScroll': { + event.offsetX = nativeEventParams.contentOffset.x; + event.offsetY = nativeEventParams.contentOffset.y; + break; + } + default: + } + return event; + }, }, }); @@ -53,6 +64,7 @@ function registerUlRefresh(Vue) { render(h) { const on = getEventRedirector.call(this, [ 'refresh', + 'scroll', ]); return h('hi-ul-refresh-wrapper', { on,