diff --git a/en/react-native-base64.md b/en/react-native-base64.md index 05f8e505e1ba9b95af047738f329bef16bf9b8aa..36bac2f4db03c1435fa648fd89ea9cb2127ae659 100644 --- a/en/react-native-base64.md +++ b/en/react-native-base64.md @@ -12,7 +12,7 @@

-> [!TIP] [GitHub address](https://github.com/eranbo/react-native-base64) +> [!TIP] [GitHub address](https://github.com/eranbo/react-native-base64/releases/tag/0.2.1) ## Installation and Usage diff --git a/en/react-native-ble-manager.md b/en/react-native-ble-manager.md index 198bd69e511b74ba713c144c4ee6865b636326f7..091ba51756e662550681cbe0e15816bb4f5fee6b 100644 --- a/en/react-native-ble-manager.md +++ b/en/react-native-ble-manager.md @@ -45,7 +45,7 @@ The following code shows the basic use scenario of the repository: ```js import React, { useState, useEffect } from 'react'; -import { ScrollView, StyleSheet, Button, View, Text, NativeEventEmitter, NativeModules, TouchableHighlight, FlatList, Alert } from 'react-native'; +import { StyleSheet, Button, View, Text, NativeEventEmitter, NativeModules, TouchableHighlight, FlatList, Alert } from 'react-native'; import ReactNativeBleManager from 'react-native-ble-manager'; import { Peripheral } from 'react-native-ble-manager'; import { Colors } from 'react-native/Libraries/NewAppScreen'; @@ -185,21 +185,21 @@ export default function BleManagerDemo() { @@ -456,7 +456,7 @@ Method 1 (recommended): Use the HAR file. Open `entry/oh-package.json5` file and add the following dependencies: -> [!TIP] 因本库需要两台手机去进行对端扫描和连接,所以两台手机各装一个 har 包编译(`ble_managerGatt.har` 和 `ble_managerServers.har`) +> [!TIP] This library requires two mobile phones to scan and connect to the peer end. Therefore, a .har file (`ble_managerGatt.har` and `ble_managerServers.har`) needs to be installed on each of the two mobile phones for compilation. the first mobile phone: `ble_managerGatt.har` @@ -529,9 +529,9 @@ Check the release version information in the release address of the third-party ### Permission Requirements -- 由于此库涉及蓝牙系统控制功能,使用对应接口时则需要配置对应的权限,权限需配置在 entry/src/main 目录下 module.json5 文件中。其中部分权限需弹窗向用户申请授权。具体权限配置见文档:[程序访问控制](https://gitee.com/openharmony/docs/blob/master/en/application-dev/security/AccessToken/Readme-CN.md#/openharmony/docs/blob/master/en/application-dev/security/AccessToken/app-permission-mgmt-overview.md)。 +- This library involves the Bluetooth system control function. Therefore, you need to configure the corresponding permission in the **module.json5** file in the **entry/src/main** directory when using the corresponding APIs. Some permissions need to be requested from users in a pop-up window. For details about the permission configuration, see [Application Access Control](https://gitee.com/openharmony/docs/blob/master/en/application-dev/security/AccessToken/Readme-CN.md#/openharmony/docs/blob/master/en/application-dev/security/AccessToken/app-permission-mgmt-overview.md). -- 此库部分功能与接口需要 normal 权限:ohos.permission.ACCESS_BLUETOOTH。 +- Some functions and APIs of this library require the **normal** permission **ohos.permission.ACCESS_BLUETOOTH**. ## API @@ -579,19 +579,19 @@ Check the release version information in the release address of the third-party ## Known Issues -- [ ] refreshCache 用于清理和刷新蓝牙设备缓存的一部分 [issue#3](https://github.com/react-native-oh-library/react-native-ble-manager/issues/3) -- [ ] requestConnectionPriority 用于请求蓝牙连接优先级 [issue#4](https://github.com/react-native-oh-library/react-native-ble-manager/issues/4) -- [ ] startNotificationUseBuffer 用来启动一个带缓冲区的通知服务 [issue#6](https://github.com/react-native-oh-library/react-native-ble-manager/issues/6) -- [ ] CompanionScan 扫描配套设备[issue#5](https://github.com/react-native-oh-library/react-native-ble-manager/issues/5) -- [ ] getAssociatedPeripherals 检索相关外围设备(从配套管理器) [issue#7](https://github.com/react-native-oh-library/react-native-ble-manager/issues/7) -- [ ] removeAssociatedPeripheral 移除相关外围设备 [issue#8](https://github.com/react-native-oh-library/react-native-ble-manager/issues/8) -- [ ] setName 创建设置蓝牙适配器名称 [issue#9](https://github.com/react-native-oh-library/react-native-ble-manager/issues/9) -- [ ] supportsCompanion 检查当前设备是否支持配套设备管理器 [issue#10](https://github.com/react-native-oh-library/react-native-ble-manager/issues/10) -- [ ] stopNotification 停止指定特征的通知 [issue#11](https://github.com/react-native-oh-library/react-native-ble-manager/issues/11) -- [ ] writeWithoutResponse 写入不响应指定特性 [issue#12](https://github.com/react-native-oh-library/react-native-ble-manager/issues/12) -- [ ] removeBond 删除已配对的设备 [issue#13](https://github.com/react-native-oh-library/react-native-ble-manager/issues/13) -- [ ] getMaximumWriteValueLengthForWithoutResponse 用于获取在不带响应的情况下可以写入的最大数据长度 [issue#14](https://github.com/react-native-oh-library/react-native-ble-manager/issues/14) -- [ ] getMaximumWriteValueLengthForWithResponse 它用于获取在带有响应的情况下可以写入的最大数据长度 [issue#15](https://github.com/react-native-oh-library/react-native-ble-manager/issues/15) +- [ ] **refreshCache** is used to clear and refresh the cache of a Bluetooth device: [issue#3](https://github.com/react-native-oh-library/react-native-ble-manager/issues/3). +- [ ] **requestConnectionPriority** is used to request the Bluetooth connection priority: [issue#4](https://github.com/react-native-oh-library/react-native-ble-manager/issues/4). +- [ ] **startNotificationUseBuffer** is used to start a notification service with a buffer: [issue#6](https://github.com/react-native-oh-library/react-native-ble-manager/issues/6). +- [ ] **CompanionScan** is used to scan auxiliary devices: [issue#5](https://github.com/react-native-oh-library/react-native-ble-manager/issues/5). +- [ ] **getAssociatedPeripherals** is used to retrieve associated peripherals (from the mapping manager): [issue#7](https://github.com/react-native-oh-library/react-native-ble-manager/issues/7). +- [ ] **removeAssociatedPeripheral** is used to remove related peripheral devices: [issue#8](https://github.com/react-native-oh-library/react-native-ble-manager/issues/8). +- [ ] **setName** is used to create and set the name of a Bluetooth adapter: [issue#9](https://github.com/react-native-oh-library/react-native-ble-manager/issues/9). +- [ ] **supportsCompanion** is used to check whether the current device supports the mapping device manager: [issue#10](https://github.com/react-native-oh-library/react-native-ble-manager/issues/10). +- [ ] **stopNotification** is used to stop a notification with a certain feature: [issue#11](https://github.com/react-native-oh-library/react-native-ble-manager/issues/11). +- [ ] **writeWithoutResponse** is used to write without respond to a certain feature: [issue#12](https://github.com/react-native-oh-library/react-native-ble-manager/issues/12). +- [ ] **removeBond** is used to delete a paired device: [issue#13](https://github.com/react-native-oh-library/react-native-ble-manager/issues/13). +- [ ] **getMaximumWriteValueLengthForWithoutResponse** is used to obtain the maximum value that can be written in the case of no response: [issue#14](https://github.com/react-native-oh-library/react-native-ble-manager/issues/14). +- [ ] **getMaximumWriteValueLengthForWithResponse** is used to obtain the maximum value that can be written in the case of a response: [issue#15](https://github.com/react-native-oh-library/react-native-ble-manager/issues/15). ## Others diff --git a/en/react-native-community-checkbox.md b/en/react-native-community-checkbox.md index 70014fd73a86375652bcee2264a8a581733fd13b..b16be2b1c1a428636a0fa8bb5a30b2057c847efa 100644 --- a/en/react-native-community-checkbox.md +++ b/en/react-native-community-checkbox.md @@ -12,7 +12,7 @@ This third-party library has been migrated to Gitee and is now available for dir | Version | Package Name | Repository | Release | | ------------------------- | ------------------------------------------------- | ------------------ | -------------------------- | | <= 0.5.16-0.1.0@deprecated | @react-native-oh-tpl/checkbox | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox/releases) | -| >= 0.5.17 | @react-native-ohos/checkbox | [Gitee](https://gitee.com/openharmony-sig/rntpc_react-native-checkbox) | [Gitee Releases](https://gitee.com/openharmony-sig/rntpc_react-native-checkbox/releases) | +| >= 0.5.17 | @react-native-ohos/checkbox | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox/releases) | ## 1. Installation and Usage @@ -291,4 +291,4 @@ Check the release version information in the release address of the third-party ## 8. License -This project is licensed under [The MIT License (MIT)](https://gitee.com/openharmony-sig/rntpc_react-native-checkbox/blob/master/LICENSE). +This project is licensed under [The MIT License (MIT)](https://github.com/react-native-checkbox/react-native-checkbox/blob/develop/LICENSE). diff --git a/en/react-native-image-marker.md b/en/react-native-image-marker.md index af103d801c8896458ed86bb64ad05dffef140acd..e9ef2afc6141a3543bfe943d270e498f7511b45d 100644 --- a/en/react-native-image-marker.md +++ b/en/react-native-image-marker.md @@ -16,7 +16,7 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/react-native-image-marker Releases](https://github.com/react-native-oh-library/react-native-image-marker/releases). +Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/react-native-image-marker Releases](https://github.com/react-native-oh-library/react-native-image-marker/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -340,9 +340,9 @@ markImage(options: ImageMarkOptions): Promise; | Name | Description | Type | Required | Platform | HarmonyOS Support | | ------ | ----------------- | ------ | -------- | ----------- | ----------------- | -| png | iamge type png | string | no | iOS/Android | yes | -| jpg | iamge type jpg | string | no | iOS/Android | yes | -| base64 | iamge type base64 | string | no | iOS/Android | yes | +| png | image type png | string | no | iOS/Android | yes | +| jpg | image type jpg | string | no | iOS/Android | yes | +| base64 | image type base64 | string | no | iOS/Android | yes | ##### WatermarkImageOptions diff --git a/en/react-native-restart.md b/en/react-native-restart.md index 20a554c58ead8cf5b31019ff00020bae696c4379..3ce92c08e04c434bb06f5fd3e5c245318f037f90 100644 --- a/en/react-native-restart.md +++ b/en/react-native-restart.md @@ -43,6 +43,7 @@ The following code shows the basic use scenario of the repository: > [!WARNING] The name of the imported repository remains unchanged. ```js +import React from 'react'; import {Text, View, StyleSheet} from 'react-native'; import RNRestart from 'react-native-restart'; @@ -171,4 +172,4 @@ Check the release version information in the release address of the third-party ## License -This project is licensed under [The MIT License (MIT)](https://github.com/avishayil/react-native-restart/blob/master/LICENSE),请自由地享受和参与开源。 \ No newline at end of file +This project is licensed under [The MIT License (MIT)](https://github.com/avishayil/react-native-restart/blob/master/LICENSE) \ No newline at end of file diff --git a/en/react-native-system-setting.md b/en/react-native-system-setting.md index 2f2bd15826d9e8e1f14fef12b62318b0d65954d1..6d9182cc6a6080b3c7b667ca9bcfa4aa495a657b 100644 --- a/en/react-native-system-setting.md +++ b/en/react-native-system-setting.md @@ -44,10 +44,8 @@ The following code shows the basic use scenario of the repository: > [!WARNING] The name of the imported repository remains unchanged. ```tsx -import React, { useEffect, useState } from "react"; -import SystemSetting, { - EmitterSubscription, -} from "react-native-system-setting"; +import React, { useState } from "react"; +import SystemSetting from "react-native-system-setting"; import { ScrollView, Text, @@ -62,6 +60,7 @@ const SystemSettingDemo: React.FC = (): JSX.Element => { const enabled = await SystemSetting.isBluetoothEnabled(); setBluetoothEnabled(enabled); }; + let bluetoothEvent: Function = () => {}; return ( <> @@ -163,7 +162,7 @@ export default SystemSettingDemo; ## Use Codegen -If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/zh-cn/codegen.md). +If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/en/codegen.md). ## Link @@ -210,7 +209,7 @@ ohpm install Method 2: Directly link to the source code. -> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md). +> [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md). ### 3. Introducing RNSystemSettingPackage to ArkTS @@ -251,11 +250,11 @@ Check the release version information in the release address of the third-party ### Permission Requirements -由于此库涉及蓝牙、亮度等系统控制功能,使用对应接口时则需要配置对应的权限,权限需配置在 entry/src/main 目录下 module.json5 文件中。其中部分权限需弹窗向用户申请授权。具体权限配置见文档: [程序访问控制](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/AccessToken/Readme-CN.md#/openharmony/docs/blob/master/zh-cn/application-dev/security/AccessToken/app-permission-mgmt-overview.md)。 +This library involves system control functions such as Bluetooth and brightness. Therefore, you need to configure the corresponding permission in the **module.json5** file in the **entry/src/main** directory when using the corresponding APIs. Some permissions need to be requested from users in a pop-up window. For details about the permission configuration, see [Application Access Control](https://gitee.com/openharmony/docs/blob/master/en/application-dev/security/AccessToken/Readme-EN.md#/openharmony/docs/blob/master/en/application-dev/security/AccessToken/app-permission-mgmt-overview.md)。 -此库部分功能与接口需要 normal 权限: ohos.permission.ACCESS_BLUETOOTH、ohos.permission.GET_WIFI_INFO。 +Some functions and APIs of this library require the **normal** permissions **ohos.permission.ACCESS_BLUETOOTH** and **ohos.permission.GET_WIFI_INFO**. -此库部分功能与接口需要 full sdk 与 system_basic 权限: ohos.permission.MANAGE_SECURE_SETTINGS、ohos.permission.MANAGE_WIFI_CONNECTION 等,[full sdk 获取地址](https://eco-betaclub.rnd.huawei.com/#/download/DevEco%20Studio/newest),[system_basic 权限获取方式](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/determine-application-mode-0000001774120042-V5)。 +Some functions and APIs of this library require the [**full sdk**](https://eco-betaclub.rnd.huawei.com/#/download/DevEco%20Studio/newest) and [**system_basic**](https://developer.huawei.com/consumer/en/doc/harmonyos-guides-V5/determine-application-mode-0000001774120042-V5) permissions, such as **ohos.permission.MANAGE_SECURE_SETTINGS** and **ohos.permission.MANAGE_WIFI_CONNECTION**. ## API @@ -303,18 +302,18 @@ For details, see [react-native-system-setting](https://github.com/c19354837/reac ## Others -由于仅支持 Android/iOS 特有功能,HarmonyOS 暂无法实现的接口: [issue#11](https://github.com/react-native-oh-library/react-native-system-setting/issues/11) +HarmonyOS does not support certain APIs that are exclusive to Android/iOS: [issue#11](https://github.com/react-native-oh-library/react-native-system-setting/issues/11). ## Known Issues -- [ ] 由于系统音量权限问题,HarmonyOS 暂无法实现的接口: [issue#3](https://github.com/react-native-oh-library/react-native-system-setting/issues/3) -- [ ] 由于系统亮度与亮度模式权限问题,HarmonyOS 暂无法实现的接口: [issue#4](https://github.com/react-native-oh-library/react-native-system-setting/issues/4) -- [ ] 由于系统 WiFi 权限问题,HarmonyOS 暂无法实现的接口: [issue#5](https://github.com/react-native-oh-library/react-native-system-setting/issues/5) -- [ ] 由于系统未支持删除音量监听器,HarmonyOS 暂无法实现的接口: [issue#6](https://github.com/react-native-oh-library/react-native-system-setting/issues/6) -- [ ] 由于系统未支持位置服务模式监听器相关接口,HarmonyOS 暂无法实现的接口: [issue#7](https://github.com/react-native-oh-library/react-native-system-setting/issues/7) -- [ ] 由于系统未支持位置服务模式获取相关接口,HarmonyOS 暂无法实现的接口: [issue#8](https://github.com/react-native-oh-library/react-native-system-setting/issues/8) -- [ ] 由于系统未支持获取飞行模式状态相关接口,HarmonyOS 暂无法实现的接口: [issue#9](https://github.com/react-native-oh-library/react-native-system-setting/issues/9) -- [ ] 由于系统未支持飞行模式开关监听器相关接口,HarmonyOS 暂无法实现的接口: [issue#10](https://github.com/react-native-oh-library/react-native-system-setting/issues/10) +- [ ] HarmonyOS does not support certain APIs due to the system volume permission: [issue#3](https://github.com/react-native-oh-library/react-native-system-setting/issues/3). +- [ ] HarmonyOS does not support certain APIs due to the system brightness and brightness mode permission: [issue#4](https://github.com/react-native-oh-library/react-native-system-setting/issues/4). +- [ ] HarmonyOS does not support certain APIs due to the system Wi-Fi permission: [issue#5](https://github.com/react-native-oh-library/react-native-system-setting/issues/5). +- [ ] HarmonyOS does not support certain APIs because the system does not support the deletion of volume listeners: [issue#6](https://github.com/react-native-oh-library/react-native-system-setting/issues/6). +- [ ] HarmonyOS does not support certain APIs because the system does not support the location service mode listener APIs: [issue#7](https://github.com/react-native-oh-library/react-native-system-setting/issues/7). +- [ ] HarmonyOS does not support certain APIs because the system does not support the API for obtaining the location service mode: [issue#8](https://github.com/react-native-oh-library/react-native-system-setting/issues/8). +- [ ] HarmonyOS does not support certain APIs because the system does not support the API for obtaining the airplane mode status: [issue#9](https://github.com/react-native-oh-library/react-native-system-setting/issues/9). +- [ ] HarmonyOS does not support certain APIs because the system does not support the API for enabling or disabling the airplane mode listener: [issue#10](https://github.com/react-native-oh-library/react-native-system-setting/issues/10). ## License diff --git a/en/rn-tourguide.md b/en/rn-tourguide.md index 5b4b652ceaf67db7c18bd3855d812a8ecf7e2490..96e3f26f23a026b9d023a84a21c17cbec9ea2193 100644 --- a/en/rn-tourguide.md +++ b/en/rn-tourguide.md @@ -84,10 +84,10 @@ const AppContent = () => { }, [canStart]) React.useEffect(() => { - eventEmitter.on('start', () => console.log('start')) - eventEmitter.on('stop', () => console.log('stop')) - eventEmitter.on('stepChange', () => console.log(`stepChange`)) - return () => eventEmitter.off('*', null) + eventEmitter?.on('start', () => console.log('start')) + eventEmitter?.on('stop', () => console.log('stop')) + eventEmitter?.on('stepChange', () => console.log(`stepChange`)) + return () => eventEmitter?.off('*', () => {}) }, []) return ( @@ -202,7 +202,7 @@ const styles = StyleSheet.create({ The HarmonyOS implementation of this library depends on the native code from @react-native-oh-tpl/react-native-svg. If this library is included into your HarmonyOS application, there is no need to include it again; you can skip the steps in this section and use it directly. -If it is not included, follow the guide provided in @react-native-oh-tpl/react-native-svg to add it to your project. +If it is not included, follow the guide provided in [@react-native-oh-tpl/react-native-svg](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-svg-capi.md#link) to add it to your project. ## Constraints diff --git a/zh-cn/react-native-base64.md b/zh-cn/react-native-base64.md index 31dbd33549d3edeb0ba153f9d0dec83e24f44547..6896da5178ba72b3111cba5931a95616e13d90ee 100644 --- a/zh-cn/react-native-base64.md +++ b/zh-cn/react-native-base64.md @@ -12,7 +12,7 @@

-> [!TIP] [Github 地址](https://github.com/eranbo/react-native-base64) +> [!TIP] [Github 地址](https://github.com/eranbo/react-native-base64/releases/tag/0.2.1) ## 安装与使用 @@ -59,7 +59,7 @@ export function Base64Page(): JSX.Element { const [word, setWord] = useState('react native'); const encodeWord = base64.encode(word); const decodeWord = base64.decode(encodeWord); - const wordEqualDecodeWord = `word equal decode word: ${word === decodeWord}`; + const wordEqualDecodeWord = `word equal decode word: ${word === decodeWord}`; const byteArrayWord = Uint8Array.from(word.split(''), w => w.charCodeAt(0)); const encodeWordFromByteArray = base64.encodeFromByteArray(byteArrayWord); const decodeFromByteArray = base64.decode(encodeWordFromByteArray); diff --git a/zh-cn/react-native-ble-manager.md b/zh-cn/react-native-ble-manager.md index db850a90ecca82d7786d3fbd05023cb803c8bb4d..4570347142222ceca3ca0c4ada3b14c0a3b43d5e 100644 --- a/zh-cn/react-native-ble-manager.md +++ b/zh-cn/react-native-ble-manager.md @@ -45,7 +45,7 @@ yarn add @react-native-oh-tpl/react-native-ble-manager ```js import React, { useState, useEffect } from 'react'; -import { ScrollView, StyleSheet, Button, View, Text, NativeEventEmitter, NativeModules, TouchableHighlight, FlatList, Alert } from 'react-native'; +import { StyleSheet, Button, View, Text, NativeEventEmitter, NativeModules, TouchableHighlight, FlatList, Alert } from 'react-native'; import ReactNativeBleManager from 'react-native-ble-manager'; import { Peripheral } from 'react-native-ble-manager'; import { Colors } from 'react-native/Libraries/NewAppScreen'; @@ -185,21 +185,21 @@ export default function BleManagerDemo() {
diff --git a/zh-cn/react-native-community-checkbox.md b/zh-cn/react-native-community-checkbox.md index faf10fe8bd89ef1e68d01b552fb06098f673f330..c0d11b50d4ba0dd829af97b90613d54f2e51560c 100644 --- a/zh-cn/react-native-community-checkbox.md +++ b/zh-cn/react-native-community-checkbox.md @@ -12,7 +12,7 @@ | Version | Package Name | Repository | Release | | ------------------------- | ------------------------------------------------- | ------------------ | -------------------------- | | <= 0.5.16-0.1.0@deprecated | @react-native-oh-tpl/checkbox | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox/releases) | -| >= 0.5.17 | @react-native-ohos/checkbox | [Gitee](https://gitee.com/openharmony-sig/rntpc_react-native-checkbox) | [Gitee Releases](https://gitee.com/openharmony-sig/rntpc_react-native-checkbox/releases) | +| >= 0.5.17 | @react-native-ohos/checkbox | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox/releases) | ## 1. 安装与使用 @@ -290,4 +290,4 @@ ohpm install ## 8. 开源协议 -本项目基于 [The MIT License (MIT)](https://gitee.com/openharmony-sig/rntpc_react-native-checkbox/blob/master/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file +本项目基于 [The MIT License (MIT)](https://github.com/react-native-checkbox/react-native-checkbox/blob/develop/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file diff --git a/zh-cn/react-native-image-marker.md b/zh-cn/react-native-image-marker.md index a0b77e644ecec0c04e6d15bce1fc3bc002053320..d153019f42bc17d352d7426d60587cbc302a89b0 100644 --- a/zh-cn/react-native-image-marker.md +++ b/zh-cn/react-native-image-marker.md @@ -323,9 +323,9 @@ ohpm install | Name | Description | Type | Required | Platform | HarmonyOS Support | | ----------- | ----------------------- | ------ | -------- | ----------- | ----------------- | -| png | iamge type png | string | no | iOS/Android | yes | -| jpg | iamge type jpg | string | no | iOS/Android | yes | -| base64 | iamge type base64 | string | no | iOS/Android | yes | +| png | image type png | string | no | iOS/Android | yes | +| jpg | image type jpg | string | no | iOS/Android | yes | +| base64 | image type base64 | string | no | iOS/Android | yes | ##### PositionOptions | Name | Description | Type | Required | Platform | HarmonyOS Support | diff --git a/zh-cn/react-native-restart.md b/zh-cn/react-native-restart.md index a09dcea3a73c701831b9449704a1142df5c46053..5ca34d54de67c3851434cc4fc60aa4a0bd91588a 100644 --- a/zh-cn/react-native-restart.md +++ b/zh-cn/react-native-restart.md @@ -42,6 +42,7 @@ yarn add @react-native-oh-tpl/react-native-restart > [!WARNING] 使用时 import 的库名不变。 ```js +import React from 'react'; import {Text, View, StyleSheet} from 'react-native'; import RNRestart from 'react-native-restart'; diff --git a/zh-cn/react-native-system-setting.md b/zh-cn/react-native-system-setting.md index 939073ee37e69b445ab09b185046475bfaf7b50d..48cdf7c6983f5ce4e299d1932d16724e18a94c1e 100644 --- a/zh-cn/react-native-system-setting.md +++ b/zh-cn/react-native-system-setting.md @@ -46,9 +46,11 @@ yarn add @react-native-oh-tpl/react-native-system-setting >[!WARNING] 使用时 import 的库名不变。 ```tsx -import React, { useEffect, useState } from 'react' -import SystemSetting, { EmitterSubscription } from 'react-native-system-setting' -import { ScrollView, Text, View, StyleSheet, TouchableOpacity } from 'react-native' +import React, { useEffect, useState } from 'react'; +import SystemSetting, { + EmitterSubscription, +} from 'react-native-system-setting'; +import { ScrollView, Text, View, StyleSheet, TouchableOpacity } from 'react-native'; const SystemSettingDemo: React.FC = (): JSX.Element => { const [bluetoothEnabled, setBluetoothEnabled] = useState() @@ -56,6 +58,7 @@ const SystemSettingDemo: React.FC = (): JSX.Element => { const enabled = await SystemSetting.isBluetoothEnabled() setBluetoothEnabled(enabled) } + let bluetoothEvent: Function = () => {}; return ( <> diff --git a/zh-cn/rn-tourguide.md b/zh-cn/rn-tourguide.md index 96738f2e72b06b2995ae0ea7e92762c092887d6c..80149b00a4eafbb8e07124fe01a2d9c132c71b6b 100644 --- a/zh-cn/rn-tourguide.md +++ b/zh-cn/rn-tourguide.md @@ -82,10 +82,10 @@ const AppContent = () => { }, [canStart]) React.useEffect(() => { - eventEmitter.on('start', () => console.log('start')) - eventEmitter.on('stop', () => console.log('stop')) - eventEmitter.on('stepChange', () => console.log(`stepChange`)) - return () => eventEmitter.off('*', null) + eventEmitter?.on('start', () => console.log('start')) + eventEmitter?.on('stop', () => console.log('stop')) + eventEmitter?.on('stepChange', () => console.log(`stepChange`)) + return () => eventEmitter?.off('*', () => {}) }, []) return (