diff --git a/zh-cn/react-native-QRCode.md b/zh-cn/react-native-QRCode.md
index 2e4340ef59de5f881875814056afb6821e289398..93a12162fecca79c10da4e3127e1ad90baeef5d8 100644
--- a/zh-cn/react-native-QRCode.md
+++ b/zh-cn/react-native-QRCode.md
@@ -1,6 +1,4 @@
-
-
-> 模板版本:v0.2.1
+> 模板版本:v0.2.2
react-native-qrcode
@@ -10,87 +8,159 @@
-
+
+
-> [!TIP] [Github 地址](https://github.com/cssivision/react-native-qrcode)
+
+
+
+> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-qrcode)
## 安装与使用
+1、此库依赖react-native-webview库,请先根据文档正确安装[react-native-webview](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-webview.md)。
+
+2、请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-qrcode](https://github.com/react-native-oh-library/react-native-qrcode/releases),并下载适用版本的 tgz 包。
进入到工程目录并输入以下命令:
+>[!TIP] # 处替换为 tgz 包的路径
+
#### **npm**
```bash
-npm install react-native-qrcode@0.2.7
+npm install @react-native-oh-tpl/react-native-qrcode@file:#
```
#### **yarn**
```bash
-yarn add react-native-qrcode@0.2.7
+yarn add @react-native-oh-tpl/react-native-qrcode@file:#
```
-此库是一个React原生的生成二维码的组件,不仅仅支持英文。下面的代码展示了这个库的基本使用场景,更多详情请参考[使用教程](https://github.com/cssivision/react-native-qrcode/blob/master/README.md):
+
+下面的代码展示了这个库的基本使用场景:
+
+>[!WARNING] 使用时 import 的库名不变。
```js
-import React, { Component ,useState,useEffect } from 'react'
-import { Image } from 'react-native';
+import React, {useState} from 'react';
import QRCode from 'react-native-qrcode';
-import {Animated, Text, View} from 'react-native';
-
-export function QRCodeExample() {
-
- const qrCodeSize = 128;
-
- const [codeString, setCodeString] = useState('');
-
- useEffect(() => {
- const qr = QRCode('#fff', '#000');
- qr.addQRCodeData("http://facebook.github.io/react-native/");
- qr.build();
- const qrUrl = qr.buildDataWithURL();
- setCodeString(qrUrl);
- }, ["http://facebook.github.io/react-native/"]);
-
-
-return (
-
-
-
-
-
-
-);
-}
+import {
+ StyleSheet,
+ View,
+ TextInput,
+ Button,
+} from 'react-native';
+import {TestSuite, TestCase, Tester} from '@rnoh/testerino';
+export const QrCodeExamle = () => {
+ const [text, setText] = useState('');
+ const [QRCodeValue, setQRCodeValue] = useState(null);
+ const showQRCode = () => {
+ setQRCodeValue(text);
+ };
+ const reset = () => {
+ setQRCodeValue(null);
+ setText('');
+ };
+ return (
+
+
+
+
+ setText(text)}
+ value={text}
+ />
+
+
+
+
+
+ {QRCodeValue && (
+
+ )}
+
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ backgroundColor: 'white',
+ alignItems: 'center',
+ },
+
+ input: {
+ width: 300,
+ height: 40,
+ borderColor: 'gray',
+ borderWidth: 1,
+ margin: 10,
+ borderRadius: 5,
+ padding: 5,
+ },
+});
+
+
```
+## 使用 Codegen
+
+本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/codegen.md)。
+
+## Link
+
+本库鸿蒙侧实现依赖@react-native-oh-tpl/react-native-webview 的原生端代码,如已在鸿蒙工程中引入过该库,则无需再次引入,可跳过本章节步骤,直接使用。
+
+如未引入请参照[@react-native-oh-tpl/react-native-webview 文档的 Link 章节](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-webview.md)进行引入
+
+
+
## 约束与限制
### 兼容性
+要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
-本文档内容基于以下版本验证通过:
+请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-qrcode](https://github.com/react-native-oh-library/react-native-qrcode/releases)
-1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Beta1 B.0.18; IDE:DevEco Studio 5.0.3.200; ROM:3.0.0.18;
+
+## 属性
+### QRCode
+> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。
+>
+> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。
+
+该库为UI组件库,通过配置属性标签,实现对应的功能。
+
+| Name | Type |Description |Required |Platform | HarmonyOS Support |
+| ----------- | -------------------------------------------------- | ------------ |-----------------|------- |-----|
+| value |string|What the qrcode stands for. |no |iOS/Android| yes |
+|size |number | qrcode size | no |iOS/Android | yes |
+| bgColor |string| backgroundColor |no | iOS/Android|yes |
+| fgColor |string|fgColor |no | iOS/Android | yes |
## 遗留问题
## 其他
-## 开源协议
-本项目基于 [The MIT License (MIT)](https://github.com/cssivision/react-native-qrcode/blob/master/LICENSE) ,请自由地享受和参与开源。
+## 开源协议
+本项目基于 [The MIT License (MIT)](https://github.com/react-native-oh-library/react-native-qrcode/blob/master/LICENSE) ,请自由地享受和参与开源。
-
\ No newline at end of file