Skip to content

Commit

Permalink
feat(vue): support_ul_refresh_scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
zealotchen0 committed Sep 13, 2024
1 parent f3ad698 commit 68de6b0
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 68de6b0

Please sign in to comment.