From f740a121f0f9b1e00e882626eb42a9d98dfe8dbf Mon Sep 17 00:00:00 2001 From: arvinwli Date: Wed, 1 Nov 2023 10:00:10 +0800 Subject: [PATCH] feat(renderer): replenishment example and doc --- docs/api/hippy-vue/external-components.md | 1 + .../hippy-vue-demo/src/components/native-demos/demo-swiper.vue | 1 + .../src/components/native-demo/demo-swiper.vue | 1 + 3 files changed, 3 insertions(+) diff --git a/docs/api/hippy-vue/external-components.md b/docs/api/hippy-vue/external-components.md index 8c175c52baa..0c011e30cb7 100644 --- a/docs/api/hippy-vue/external-components.md +++ b/docs/api/hippy-vue/external-components.md @@ -190,6 +190,7 @@ export default { | needAnimation | 切换页面时是否需要动画。 | `boolean` | `Android、iOS、Voltron` | | scrollEnabled | 指定ViewPager是否可以滑动,默认为true | `boolean` | `Android、iOS、Web-Renderer、Voltron` | | direction | 设置viewPager滚动方向,不设置默认横向滚动,设置 `vertical` 为竖向滚动 | `string` | `Android、Voltron` | +| scrollEventThrottle | 指定滑动事件的回调频率,传入数值指定了多少毫秒(ms)组件会调用一次 `onPageScroll` 事件 | `number` | `Android、iOS、Web-Renderer、Voltron` | ## 事件 diff --git a/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-swiper.vue b/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-swiper.vue index 06136f17940..633b0b87042 100644 --- a/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-swiper.vue +++ b/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-swiper.vue @@ -29,6 +29,7 @@ ref="swiper" need-animation :current="currentSlide" + :scrollEventThrottle="1000" @dragging="onDragging" @dropped="onDropped" @stateChanged="onStateChanged" diff --git a/driver/js/examples/hippy-vue-next-demo/src/components/native-demo/demo-swiper.vue b/driver/js/examples/hippy-vue-next-demo/src/components/native-demo/demo-swiper.vue index 7e59f62b589..c3d244e40f3 100644 --- a/driver/js/examples/hippy-vue-next-demo/src/components/native-demo/demo-swiper.vue +++ b/driver/js/examples/hippy-vue-next-demo/src/components/native-demo/demo-swiper.vue @@ -29,6 +29,7 @@ ref="swiper" need-animation :current="currentSlide" + :scrollEventThrottle="1000" @dragging="onDragging" @dropped="onDropped" @stateChanged="onStateChanged"