From d1c98621cf0044113dea7483d3da6475c7c08fa6 Mon Sep 17 00:00:00 2001
From: fzxlzy <810528574@qq.com>
Date: Sat, 23 Dec 2023 17:44:34 +0800
Subject: [PATCH] =?UTF-8?q?[Issues:=20#I8QSVM]=20=E6=B7=BB=E5=8A=A0VMall?=
=?UTF-8?q?=E7=89=88=E6=9C=ACreact-native-safe-area-context=E6=96=87?=
=?UTF-8?q?=E6=A1=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
vmall/react-native-safe-area-context.md | 28 ++++++++++++-------------
1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/vmall/react-native-safe-area-context.md b/vmall/react-native-safe-area-context.md
index 86041f50..c141d0f9 100644
--- a/vmall/react-native-safe-area-context.md
+++ b/vmall/react-native-safe-area-context.md
@@ -1,4 +1,4 @@
-> 模板版本:v0.0.1
+> 模板版本:v0.1.1
react-native-safe-area-context
@@ -18,18 +18,16 @@
-**正在 npm 发布中,当前请先从仓库[Release](https://github.com/react-native-oh-library/react-native-safe-area-context/releases)中获取库 tgz,通过使用本地依赖来安装本库。**
-
#### **yarn**
```bash
-yarn add xxx
+yarn add @react-native-oh-tpl/react-native-safe-area-context
```
#### **npm**
```bash
-npm install xxx
+npm install @react-native-oh-tpl/react-native-safe-area-context
```
@@ -79,7 +77,7 @@ export default App;
```json
"dependencies": {
"rnoh": "file:../rnoh",
- "rnoh-safe-area": "file:../../node_modules/react-native-safe-area-context/harmony/safe_area.har"
+ "rnoh-safe-area": "file:../../node_modules/@react-native-oh-tpl/react-native-safe-area-context/harmony/safe_area.har"
}
```
@@ -98,7 +96,7 @@ ohpm install
```json
"dependencies": {
"rnoh": "file:../rnoh",
- "rnoh-safe-area": "file:../../node_modules/react-native-safe-area-context/harmony/safe_area"
+ "rnoh-safe-area": "file:../../node_modules/@react-native-oh-tpl/react-native-safe-area-context/harmony/safe_area"
}
```
@@ -172,28 +170,28 @@ import {
} from 'rnoh'
import { SampleView, SAMPLE_VIEW_TYPE, PropsDisplayer } from "rnoh-sample-package"
import { createRNPackages } from '../RNPackagesFactory'
-+ import { SAFE_AREA_TYPE, RNCSafeAreaView, SAFE_AREA_PROVIDER_TYPE, SafeAreaProvider } from "rnoh-safe-area"
++ import { SAFE_AREA_VIEW_TYPE, SafeAreaView, SAFE_AREA_PROVIDER_TYPE, SafeAreaProvider } from "rnoh-safe-area"
@Builder
function CustomComponentBuilder(ctx: ComponentBuilderContext) {
- if (ctx.descriptor.type === SAMPLE_VIEW_TYPE) {
+ if (ctx.componentName === SAMPLE_VIEW_TYPE) {
SampleView({
ctx: ctx.rnohContext,
- tag: ctx.descriptor.tag,
+ tag: ctx.tag,
buildCustomComponent: CustomComponentBuilder
})
}
-+ else if (ctx.descriptor.type === SAFE_AREA_TYPE) {
-+ RNCSafeAreaView({
++ else if (ctx.componentName === SAFE_AREA_VIEW_TYPE) {
++ SafeAreaView({
+ ctx: ctx.rnohContext,
-+ tag: ctx.descriptor.tag,
++ tag: ctx.tag,
+ buildCustomComponent: CustomComponentBuilder
+ })
+ }
-+ else if (ctx.descriptor.type === SAFE_AREA_PROVIDER_TYPE) {
++ else if (ctx.componentName === SAFE_AREA_PROVIDER_TYPE) {
+ SafeAreaProvider({
+ ctx: ctx.rnohContext,
-+ tag: ctx.descriptor.tag,
++ tag: ctx.tag,
+ buildCustomComponent: CustomComponentBuilder
+ })
+ }
--
Gitee