From 6d536c41ca13f9d04d1e3bce278de45f024e4b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9D=E4=B9=94=E6=9E=97?= Date: Fri, 5 Jul 2024 17:18:29 +0800 Subject: [PATCH 1/6] =?UTF-8?q?docs:=20[Issues:=20#IAADKA]=20=E6=8C=890.2.?= =?UTF-8?q?2=E8=A7=84=E8=8C=83=E4=BF=AE=E6=94=B9=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 --- zh-cn/react-native-image-viewing.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zh-cn/react-native-image-viewing.md b/zh-cn/react-native-image-viewing.md index f1476123..0e10ba01 100644 --- a/zh-cn/react-native-image-viewing.md +++ b/zh-cn/react-native-image-viewing.md @@ -1,5 +1,5 @@ -> 模板版本:v0.2.0 +> 模板版本:v0.2.2

react-native-image-viewing

@@ -186,7 +186,9 @@ const styles = StyleSheet.create({ ## 兼容性 -在下述版本验证通过: +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[Releases](https://github.com/react-native-oh-library/react-native-image-viewing/releases) + +本文档内容基于以下版本验证通过: 1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Preview2; IDE:DevEco Studio 5.0.3.200; ROM:205.0.0.18; -- Gitee From eb13454537e8f0b82116436de5827ea89ab62ecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9D=E4=B9=94=E6=9E=97?= Date: Fri, 5 Jul 2024 19:53:11 +0800 Subject: [PATCH 2/6] =?UTF-8?q?docs:=20[Issues:=20#IAADKA]=20=E6=8C=890.2.?= =?UTF-8?q?2=E8=A7=84=E8=8C=83=E4=BF=AE=E6=94=B9=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 --- zh-cn/react-native-image-viewing.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/zh-cn/react-native-image-viewing.md b/zh-cn/react-native-image-viewing.md index 0e10ba01..4d4f2ca9 100644 --- a/zh-cn/react-native-image-viewing.md +++ b/zh-cn/react-native-image-viewing.md @@ -1,18 +1,20 @@ + > 模板版本:v0.2.2

react-native-image-viewing

- + Supported platforms - + License

+ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-image-viewing) ## 安装与使用 @@ -184,13 +186,13 @@ const styles = StyleSheet.create({ ``` -## 兼容性 +## 约束与限制 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[Releases](https://github.com/react-native-oh-library/react-native-image-viewing/releases) +#### 兼容性 -本文档内容基于以下版本验证通过: +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Preview2; IDE:DevEco Studio 5.0.3.200; ROM:205.0.0.18; +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[Releases](https://github.com/react-native-oh-library/react-native-image-viewing/releases) ## API列表 @@ -220,6 +222,6 @@ const styles = StyleSheet.create({ ## 开源协议 -本项目基于 [The MIT License (MIT)](https://github.com/facebook/prop-types/blob/v15.8.1/LICENSE) ,请自由地享受和参与开源。 +本项目基于 [The MIT License (MIT)](https://github.com/jobtoday/react-native-image-viewing/blob/master/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file -- Gitee From 20928766c0e5e719aa153054ed9dd540ec37cbff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9D=E4=B9=94=E6=9E=97?= Date: Wed, 10 Jul 2024 12:27:42 +0800 Subject: [PATCH 3/6] =?UTF-8?q?docs:=20[Issues:=20#IAADKA]=20=E6=8C=890.2.?= =?UTF-8?q?2=E8=A7=84=E8=8C=83=E4=BF=AE=E6=94=B9=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 --- zh-cn/react-native-image-viewing.md | 46 ++++++++++++++++------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/zh-cn/react-native-image-viewing.md b/zh-cn/react-native-image-viewing.md index 4d4f2ca9..05007e2e 100644 --- a/zh-cn/react-native-image-viewing.md +++ b/zh-cn/react-native-image-viewing.md @@ -19,7 +19,7 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[<@react-native-oh-tpl/react-native-image-viewing> Releases](https://github.com/react-native-oh-library/react-native-image-viewing/releases),并下载适用版本的 tgz 包。 +请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-image-viewing Releases](https://github.com/react-native-oh-library/react-native-image-viewing/releases),并下载适用版本的 tgz 包。 进入到工程目录并输入以下命令: @@ -194,29 +194,33 @@ const styles = StyleSheet.create({ 请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[Releases](https://github.com/react-native-oh-library/react-native-image-viewing/releases) -## API列表 - -| Name | Description | Type | Required | HarmonyOS Support | -| ---------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | -------- | ----------------- | -| images | Array of images to display | ImageSource[] | Yes | Yes | -| keyExtractor | Uniqely identifying each image | (imageSrc: ImageSource, index: number) => string | No | Yes | -| imageIndex | Current index of image to display | number | Yes | Yes | -| visible | Is modal shown or not | boolean | No | Yes | -| onRequestClose | Function called to close the modal | function | Yes | Yes | -| onImageIndexChange | Function called when image index has been changed | function | No | Yes | -| onLongPress | Function called when image long pressed | function (event: GestureResponderEvent, image: ImageSource) | No | Yes | -| delayLongPress | Delay in ms, before onLongPress is called: default | number | No | Yes | -| animationType | Animation modal presented with: default | none, fade, slide | No | Yes | -| presentationStyle | Modal presentation style: default: fullScreen Android: Use overFullScreen to hide StatusBar | fullScreen, pageSheet, formSheet, overFullScreen | No | Yes | -| backgroundColor | Background color of the modal in HEX | string | No | Yes | -| swipeToCloseEnabled | Close modal with swipe up or down: default | boolean | No | Yes | -| doubleTapToZoomEnabled | Zoom image by double tap on it: default | boolean | No | Yes | -| HeaderComponent | Header component, gets current imageIndex as a prop | component, function | No | Yes | -| FooterComponent | Footer component, gets current imageIndex as a prop | component, function | No | Yes | +## 属性 + +> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 + +> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 + +| Name | Description | Type | Platform | Required | HarmonyOS Support | +| ---------------------- | ------------------------------------------------------------ | ----------------------------------------------------------- | -------- | -------- | ----------------- | +| images | Array of images to display | ImageSource[] | All | Yes | Yes | +| keyExtractor | Uniqely identifying each image | (imageSrc: ImageSource, index: number) => string | All | No | Yes | +| imageIndex | Current index of image to display | number | All | Yes | Yes | +| visible | Is modal shown or not | boolean | All | No | Yes | +| onRequestClose | Function called to close the modal | function | All | Yes | Yes | +| onImageIndexChange | Function called when image index has been changed | function | All | No | Yes | +| onLongPress | Function called when image long pressed | function (event: GestureResponderEvent, image: ImageSource) | All | No | Yes | +| delayLongPress | Delay in ms, before onLongPress is called: default | number | All | No | Yes | +| animationType | Animation modal presented with: default | none, fade, slide | All | No | Yes | +| presentationStyle | Modal presentation style: default: fullScreen Android: Use overFullScreen to hide StatusBar | fullScreen, pageSheet, formSheet, overFullScreen | All | No | Yes | +| backgroundColor | Background color of the modal in HEX | string | All | No | Yes | +| swipeToCloseEnabled | Close modal with swipe up or down: default | boolean | All | No | Yes | +| doubleTapToZoomEnabled | Zoom image by double tap on it: default | boolean | All | No | Yes | +| HeaderComponent | Header component, gets current imageIndex as a prop | component, function | All | No | Yes | +| FooterComponent | Footer component, gets current imageIndex as a prop | component, function | All | No | Yes | ## 遗留问题 -- [ ] 本库 swipeToCloseEnabled,doubleTapToZoomEnabled,animationType 还未完全HarmonyOS化,暂不支持上下滑动关闭、双击放大与动画效果功能 (未解决)[#I9DNQU](https://gitee.com/react-native-oh-library/usage-docs/issues/I9DQPA) +- [ ] 本库 swipeToCloseEnabled,doubleTapToZoomEnabled,animationType HarmonyOS暂不支持,上下滑动关闭、双击放大与动画效果功能 [#I9DNQU](https://gitee.com/react-native-oh-library/usage-docs/issues/I9DQPA) ## 其他 -- Gitee From 948666572d30f09087be0c693e8c91d35ef3ae4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9D=E4=B9=94=E6=9E=97?= Date: Mon, 22 Jul 2024 18:04:54 +0800 Subject: [PATCH 4/6] =?UTF-8?q?docs:=20[Issues:=20#IAADKA]=20=E6=8C=890.2.?= =?UTF-8?q?2=E8=A7=84=E8=8C=83=E4=BF=AE=E6=94=B9=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 --- zh-cn/react-native-image-viewing.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zh-cn/react-native-image-viewing.md b/zh-cn/react-native-image-viewing.md index 05007e2e..7152c103 100644 --- a/zh-cn/react-native-image-viewing.md +++ b/zh-cn/react-native-image-viewing.md @@ -188,17 +188,17 @@ const styles = StyleSheet.create({ ## 约束与限制 -#### 兼容性 +### 兼容性 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[Releases](https://github.com/react-native-oh-library/react-native-image-viewing/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-image-viewing Releases](https://github.com/react-native-oh-library/react-native-image-viewing/releases) ## 属性 -> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 -> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 | Name | Description | Type | Platform | Required | HarmonyOS Support | | ---------------------- | ------------------------------------------------------------ | ----------------------------------------------------------- | -------- | -------- | ----------------- | -- Gitee From d0391a5bf2c9023a3c582c75b379e19c5978da3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9D=E4=B9=94=E6=9E=97?= Date: Mon, 22 Jul 2024 18:54:41 +0800 Subject: [PATCH 5/6] =?UTF-8?q?docs:=20[Issues:=20#IAADKA]=20=E6=8C=890.2.?= =?UTF-8?q?2=E8=A7=84=E8=8C=83=E4=BF=AE=E6=94=B9=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 --- zh-cn/react-native-image-viewing.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zh-cn/react-native-image-viewing.md b/zh-cn/react-native-image-viewing.md index 7152c103..5cdc050a 100644 --- a/zh-cn/react-native-image-viewing.md +++ b/zh-cn/react-native-image-viewing.md @@ -99,7 +99,9 @@ const ImageList = ({ images, shift = 0, onPress }: Props) => ( activeOpacity={0.8} onPress={() => onPress(index)} > - + { + typeof imageUrl === 'string' ? : + } ))} -- Gitee From 99234d0de26ae2b43ff5924fbf6722cdcd61a74c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9D=E4=B9=94=E6=9E=97?= Date: Mon, 22 Jul 2024 19:59:32 +0800 Subject: [PATCH 6/6] =?UTF-8?q?docs:=20[Issues:=20#IAADKA]=20=E6=8C=890.2.?= =?UTF-8?q?2=E8=A7=84=E8=8C=83=E4=BF=AE=E6=94=B9=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 --- zh-cn/react-native-image-viewing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zh-cn/react-native-image-viewing.md b/zh-cn/react-native-image-viewing.md index 5cdc050a..634e181c 100644 --- a/zh-cn/react-native-image-viewing.md +++ b/zh-cn/react-native-image-viewing.md @@ -222,7 +222,7 @@ const styles = StyleSheet.create({ ## 遗留问题 -- [ ] 本库 swipeToCloseEnabled,doubleTapToZoomEnabled,animationType HarmonyOS暂不支持,上下滑动关闭、双击放大与动画效果功能 [#I9DNQU](https://gitee.com/react-native-oh-library/usage-docs/issues/I9DQPA) +- [ ] 本库 swipeToCloseEnabled,doubleTapToZoomEnabled,animationType HarmonyOS暂不支持,上下滑动关闭、双击放大与动画效果功能 [issue#2](https://github.com/react-native-oh-library/react-native-image-viewing/issues/2) ## 其他 -- Gitee