From 925d1850b1b9efb1ac8873a725d356bf9090dc75 Mon Sep 17 00:00:00 2001 From: wwwcg Date: Fri, 11 Oct 2024 15:57:53 +0800 Subject: [PATCH] feat(ios): add showScrollIndicator prop for waterfall component (#4057) --- docs/api/hippy-react/components.md | 1 + docs/api/hippy-vue/external-components.md | 1 + .../renderer/component/waterfalllist/HippyWaterfallViewManager.m | 1 + 3 files changed, 3 insertions(+) diff --git a/docs/api/hippy-react/components.md b/docs/api/hippy-react/components.md index 8eb31e2f312..dedb680ed7f 100644 --- a/docs/api/hippy-react/components.md +++ b/docs/api/hippy-react/components.md @@ -550,6 +550,7 @@ import icon from './qb_icon_new.png'; | renderPullHeader | 如何渲染 `PullHeader`,此时 `containPullHeader` 默认设置成 `true` | `() => React.ReactElement` | `Android、iOS、Voltron` | | renderPullFooter | 如何渲染 `PullFooter`,此时 `containPullFooter` 默认设置成 `true` | `() => React.ReactElement` | `Android、iOS、Voltron` | | onScroll | 当触发 `WaterFall` 的滑动事件时回调。`startEdgePos`表示距离 List 顶部边缘滚动偏移量;`endEdgePos`表示距离 List 底部边缘滚动偏移量;`firstVisibleRowIndex`表示当前可见区域内第一个元素的索引;`lastVisibleRowIndex`表示当前可见区域内最后一个元素的索引;`visibleRowFrames`表示当前可见区域内所有 item 的信息(x,y,width,height) | `nativeEvent: { startEdgePos: number, endEdgePos: number, firstVisibleRowIndex: number, lastVisibleRowIndex: number, visibleRowFrames: Object[] }` | `Android、iOS、Voltron` +| showScrollIndicator | 是否显示滚动条。(iOS 3.3.2版本起支持) `default: true` | `boolean` | `iOS` | ## 方法 diff --git a/docs/api/hippy-vue/external-components.md b/docs/api/hippy-vue/external-components.md index 1e47c97ee04..6c6c112713a 100644 --- a/docs/api/hippy-vue/external-components.md +++ b/docs/api/hippy-vue/external-components.md @@ -285,6 +285,7 @@ export default { | containPullFooter | 是否包含 `pull-footer` | `boolean` | `Android、iOS、Voltron` | | numberOfColumns | 瀑布流列数量,Default: 2 | `number` | `Android、iOS、Voltron` | | preloadItemNumber | 滑动到瀑布流底部前提前预加载的 item 数量 | `number` | `Android、iOS、Voltron` | +| showScrollIndicator | 是否显示滚动条。(iOS 3.3.2版本起支持) `default: true` | `boolean` | `iOS` | ## 事件 diff --git a/renderer/native/ios/renderer/component/waterfalllist/HippyWaterfallViewManager.m b/renderer/native/ios/renderer/component/waterfalllist/HippyWaterfallViewManager.m index 5e3e33f1521..936a8dd5db4 100644 --- a/renderer/native/ios/renderer/component/waterfalllist/HippyWaterfallViewManager.m +++ b/renderer/native/ios/renderer/component/waterfalllist/HippyWaterfallViewManager.m @@ -44,6 +44,7 @@ @implementation HippyWaterfallViewManager HIPPY_EXPORT_VIEW_PROPERTY(containPullFooter, BOOL) HIPPY_EXPORT_VIEW_PROPERTY(scrollEventThrottle, double) HIPPY_EXPORT_VIEW_PROPERTY(onScroll, HippyDirectEventBlock) +HIPPY_REMAP_VIEW_PROPERTY(showScrollIndicator, collectionView.showsVerticalScrollIndicator, BOOL) - (UIView *)view { return [[HippyWaterfallView alloc] init];