From d91d9d06c006b773e4981ff45a2859183a7e7e50 Mon Sep 17 00:00:00 2001 From: wang-yuanbai <603970629@qq.com> Date: Fri, 12 Jan 2024 17:44:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[Issues:=20#I8T6IX]=20=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?view-shot=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-view-shot.md | 258 ++++++++++++++++++++++++++++++++ 1 file changed, 258 insertions(+) create mode 100644 zh-cn/react-native-view-shot.md diff --git a/zh-cn/react-native-view-shot.md b/zh-cn/react-native-view-shot.md new file mode 100644 index 00000000..027e964e --- /dev/null +++ b/zh-cn/react-native-view-shot.md @@ -0,0 +1,258 @@ +> 模板版本:v0.1.2 + +

+

react-native-view-shot

+

+

+ + Supported platforms + + + License + +

+ +> [!tip] [Github 地址](https://github.com/react-native-oh-library/react-native-view-shot) + +## 安装与使用 + +进入到工程目录并输入以下命令: + + + +**正在 npm 发布中,当前请先从仓库[Releases](https://github.com/react-native-oh-library/react-native-view-shot/releases)中获取库 tgz,通过使用本地依赖来安装本库。** + +#### **yarn** + +```bash +yarn add xxx +``` + +#### **npm** + +```bash +npm install xxx +``` + + + +快速使用: + +```js +import React from "react"; +import { View, Text, Button } from "react-native"; +import { captureRef, captureScreen } from "react-native-view-shot"; + +export default function App() { + const view = React.useRef < View > null; + return ( + + + + Hello OpenHarmony + + Hello HarmonyOS + + Hello HarmonyOS Next + + Hello World + + +