From 77385ed761a6122aa41f9f081fcbe362968bc0e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E6=9A=AE=E6=B5=81=E6=AE=87?= Date: Fri, 26 Apr 2024 16:15:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[Issues:=20#I9JYJB]=20=E4=BF=AE=E6=94=B9=20?= =?UTF-8?q?react-native-intersection-observer=20=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1224/react-native-intersection-observer.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/1224/react-native-intersection-observer.md b/1224/react-native-intersection-observer.md index 8e336901..3ed94067 100644 --- a/1224/react-native-intersection-observer.md +++ b/1224/react-native-intersection-observer.md @@ -80,7 +80,8 @@ export default App; 在下述版本验证通过: -RNOH:0.72.13; SDK:HarmonyOS NEXT Developer Preview1; IDE:DevEco Studio 4.1.3.500; ROM:2.0.0.59; +1.RNOH:0.72.13; SDK:HarmonyOS NEXT Developer Preview1; IDE:DevEco Studio 4.1.3.500; ROM:2.0.0.59; +2.RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Bate1; IDE:DevEco Studio 5.0.3.29; ROM:3.0.0.18(SP32DEVC00E18R4Plog); #### 组件及属性 -- Gitee From 1813a86875ee2ed5ed3bef9ae71fb46604906187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E6=9A=AE=E6=B5=81=E6=AE=87?= Date: Sun, 28 Apr 2024 18:53:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[Issues:=20#I9KG85]=20=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=20react-native-intersection-observer=20=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=89=8B=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh-cn/react-native-intersection-observer.md | 32 +++++++++++++-------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/zh-cn/react-native-intersection-observer.md b/zh-cn/react-native-intersection-observer.md index cf2cd6b8..7b799ebf 100644 --- a/zh-cn/react-native-intersection-observer.md +++ b/zh-cn/react-native-intersection-observer.md @@ -13,8 +13,8 @@

-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-intersection-observer/tree/sig) +> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-intersection-observer/tree/sig) ## 安装与使用 请到三方库的 Releases 发布地址查看配套的版本信息:[<@react-native-oh-library/react-native-intersection-observer> Releases](https://github.com/react-native-oh-library/react-native-intersection-observer/releases),并下载适用版本的 tgz 包。 @@ -44,13 +44,13 @@ yarn add @react-native-oh-library/react-native-intersection-observer@file:# > [!WARNING] 使用时 import 的库名不变。 ```tsx -import React, { useRef } from "react"; -import { Text } from "react-native"; +import React, { useRef } from 'react'; +import { Text } from 'react-native'; import { IOScrollView, IOScrollViewController, InView, -} from "react-native-intersection-observer"; +} from 'react-native-intersection-observer'; function App() { const scrollViewRef = useRef(null); @@ -63,7 +63,7 @@ function App() { > Scroll to bottom - console.log("Inview:", inView)}> + console.log('Inview:', inView)}> Plain children are always rendered. Use onChange to monitor state. @@ -76,12 +76,12 @@ export default App; ``` ## 约束与限制 - #### 兼容性 在下述版本验证通过: -RNOH:0.72.13; SDK:HarmonyOS NEXT Developer Preview1; IDE:DevEco Studio 4.1.3.500; ROM:2.0.0.59; +1.RNOH:0.72.13; SDK:HarmonyOS NEXT Developer Preview1; IDE:DevEco Studio 4.1.3.500; ROM:2.0.0.59; +2.RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Bate1; IDE:DevEco Studio 5.0.3.29; ROM:3.0.0.18; #### 组件及属性 @@ -92,6 +92,8 @@ RNOH:0.72.13; SDK:HarmonyOS NEXT Developer Preview1; IDE:DevEco Studio 4.1 如下是已经鸿蒙化的属性: > [!tip] "鸿蒙支持"列为 yes 的属性表示支持鸿蒙平台,并且效果对标"原库平台"列中的 ios 或 android 的效果。 +> +> #### **IOScrollView** **组件** @@ -105,6 +107,8 @@ Props: Inherits [ScrollView Props](https://reactnative.dev/docs/scrollview#props Methods: Inherits [ScrollView Methods](https://reactnative.dev/docs/scrollview#methods) + + #### **IOFlatList** **组件** #### 此组件有以下属性: @@ -117,17 +121,21 @@ Props: Inherits [FlatList Props](https://reactnative.dev/docs/flatlist#props) Methods: Inherits [FlatList Methods](https://reactnative.dev/docs/flatlist#methods) + + #### **InView** **组件** #### 此组件有以下属性: -| Name | Description | Type | Default | Require | HarmonyOS Support | -| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ------- | ------- | ----------------- | -| as | `Render the wrapping element as this element. Defaults to `View`.` | `ComponentType` | View | false | yes | -| children | Children expects a plain child, to have the `` deal with the wrapping element. | ReactNode | | true | yes | -| triggerOnce | Only trigger this method once. | boolean | false | false | yes | +| Name | Description | Type | Default | Require | HarmonyOS Support | +| ----------- | ------------------------------------------------------------ | --------------------------- | ------- | ------- | ----------------- | +| as | `Render the wrapping element as this element. Defaults to `View`.` | `ComponentType` | View | false | yes | +| children | Children expects a plain child, to have the `` deal with the wrapping element. | ReactNode | | true | yes | +| triggerOnce | Only trigger this method once. | boolean | false | false | yes | | onChange | Call this function whenever the in view state changes. It will receive the `inView` boolean, alongside the current `IntersectionObserverEntry`. | `(inView: boolean) => void` | | false | yes | + + ## 遗留问题 ## 其他 -- Gitee