diff --git a/1224/model.md b/1224/model.md index b55a6c88c8acdd059889fb59351a5f4715d5d6a4..a0f149f5a33d499ce2dce52748634f4d23d0c697 100644 --- a/1224/model.md +++ b/1224/model.md @@ -25,24 +25,26 @@ 请到三方库的 Releases 发布地址查看配套的版本信息:[<@react-native-oh-tpl/库名> Releases](https://github.com/<仓库地址>/releases),并下载适用版本的 tgz 包。 -进入到工程目录,打开 `package.json`,添加: +进入到工程目录并输入以下命令: -```json -{ - "dpendencies": { - ... - "@react-native-oh-tpl/<库名>": "tgz包路径" - }, - ... -} +>[!TIP] # 处替换为 tgz 包的路径 + + + +#### **npm** + +```bash +npm install @react-native-oh-tpl/<库名>@file:# ``` -打开终端,执行: +#### **yarn** ```bash -npm i +yarn add @react-native-oh-tpl/<库名>@file:# ``` + + 下面的代码展示了这个库的基本使用场景: >[!WARNING] 使用时 import 的库名不变。 diff --git a/zh-cn/model.md b/zh-cn/model.md index 6edf3a440db8917eb4bf5fb2936ef489d54fe380..a0f149f5a33d499ce2dce52748634f4d23d0c697 100644 --- a/zh-cn/model.md +++ b/zh-cn/model.md @@ -23,28 +23,28 @@ ## 安装与使用 +请到三方库的 Releases 发布地址查看配套的版本信息:[<@react-native-oh-tpl/库名> Releases](https://github.com/<仓库地址>/releases),并下载适用版本的 tgz 包。 + 进入到工程目录并输入以下命令: -请到三方库的 Releases 发布地址查看配套的版本信息:[<@react-native-oh-tpl/库名> Releases](https://github.com/<仓库地址>/releases),并下载适用版本的 tgz 包。 +>[!TIP] # 处替换为 tgz 包的路径 -进入到工程目录,打开 `package.json`,添加: + -```json -{ - "dpendencies": { - ... - "@react-native-oh-tpl/<库名>": "tgz包路径" - }, - ... -} +#### **npm** + +```bash +npm install @react-native-oh-tpl/<库名>@file:# ``` -打开终端,执行: +#### **yarn** ```bash -npm i +yarn add @react-native-oh-tpl/<库名>@file:# ``` + + 下面的代码展示了这个库的基本使用场景: >[!WARNING] 使用时 import 的库名不变。