Skip to content

Commit

Permalink
feat(vue): support ul refresh scroll (#4032)
Browse files Browse the repository at this point in the history
* feat(vue-next): fix beforeLoadStyle not work

* feat(vue): support_ul_refresh_scroll
  • Loading branch information
zealotchen0 authored Sep 13, 2024
1 parent 611006c commit 6ab892c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/hippy-vue-native-components/src/ul-refresh.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
},
});

Expand Down Expand Up @@ -53,6 +64,7 @@ function registerUlRefresh(Vue) {
render(h) {
const on = getEventRedirector.call(this, [
'refresh',
'scroll',
]);
return h('hi-ul-refresh-wrapper', {
on,
Expand Down

0 comments on commit 6ab892c

Please sign in to comment.