diff --git a/zh-cn/lottie-react-native.md b/zh-cn/lottie-react-native.md index 56fe3cdb7b9131c3ceb47000d8f4610b5a8de660..a61b323bc23b1e1dc15f45414d0415210d329e0b 100644 --- a/zh-cn/lottie-react-native.md +++ b/zh-cn/lottie-react-native.md @@ -163,14 +163,14 @@ import { createRNPackages } from '../RNPackagesFactory' @Builder function CustomComponentBuilder(ctx: ComponentBuilderContext) { - if (ctx.componentName === SAMPLE_VIEW_TYPE) { + if (ctx.descriptor.type === SAMPLE_VIEW_TYPE) { SampleView({ ctx: ctx.rnohContext, tag: ctx.descriptor.tag, buildCustomComponent: CustomComponentBuilder }) } -+ else if (ctx.componentName === LOTTIE_TYPE) { ++ else if (ctx.descriptor.type === LOTTIE_TYPE) { + LottieAnimationView({ + ctx: ctx.rnohContext, + tag: ctx.descriptor.tag, diff --git a/zh-cn/model.md b/zh-cn/model.md index 027485229e734b2eb2d01cbec1a79ee098e2cb09..57a4522485f58edd16e4c95b3d5aba54d93cfc85 100644 --- a/zh-cn/model.md +++ b/zh-cn/model.md @@ -36,10 +36,15 @@ +// 未发布的代码加上如下描述(删除) + +**正在 npm 发布中,当前请先从仓库[Release]()中获取库 tgz,通过使用本地依赖来安装本库。** + #### **yarn** ```bash yarn add <原库 npm 包名>@npm:@react-native-oh-library/ +// 未发布的请使用 yarn add xxx,待发布后修改 // 提示:yarn add @react-native-community/slider@npm:@react-native-oh-library/slider(删除) // 提示:yarn add react-native-translucent-modal@npm:@react-native-oh-library/(删除)react-native-translucent-modal ``` @@ -48,6 +53,7 @@ yarn add <原库 npm 包名>@npm:@react-native-oh-library/ ```bash npm install <原库 npm 包名>@npm:@react-native-oh-library/ +// 未发布的请使用 npm install xxx,待发布后修改 // 提示:npm install @react-native-community/slider@npm:@react-native-oh-library/slider(删除) // 提示:npm install react-native-translucent-modal@npm:@react-native-oh-library/react-native-translucent-modal(删除) ``` @@ -215,14 +221,14 @@ import { createRNPackages } from '../RNPackagesFactory' @Builder function CustomComponentBuilder(ctx: ComponentBuilderContext) { - if (ctx.componentName === SAMPLE_VIEW_TYPE) { + if (ctx.descriptor.type === SAMPLE_VIEW_TYPE) { SampleView({ ctx: ctx.rnohContext, tag: ctx.descriptor.tag, buildCustomComponent: CustomComponentBuilder }) } -+ else if (ctx.componentName === SLIDER_TYPE) { ++ else if (ctx.descriptor.type === SLIDER_TYPE) { + RNCSlider({ + ctx: ctx.rnohContext, + tag: ctx.descriptor.tag, diff --git a/zh-cn/progress-bar-android.md b/zh-cn/progress-bar-android.md index f68b1765270e0c734c7d3fe7769df7ba655aa2f7..a76818065034b33439a6dd6165c287c5d1e4eabb 100644 --- a/zh-cn/progress-bar-android.md +++ b/zh-cn/progress-bar-android.md @@ -166,7 +166,7 @@ import { createRNPackages } from '../RNPackagesFactory' @Builder function CustomComponentBuilder(ctx: ComponentBuilderContext) { - if (ctx.componentName === SAMPLE_VIEW_TYPE) { + if (ctx.descriptor.type === SAMPLE_VIEW_TYPE) { SampleView({ ctx: ctx.rnohContext, tag: ctx.descriptor.tag, diff --git a/zh-cn/react-native-SmartRefreshLayout.md b/zh-cn/react-native-SmartRefreshLayout.md index f883804e6cf3c814c7e86b14ec07b986f5fa845e..6d9f23230ac8011fea3ac196539b4484ff8c363c 100644 --- a/zh-cn/react-native-SmartRefreshLayout.md +++ b/zh-cn/react-native-SmartRefreshLayout.md @@ -236,7 +236,7 @@ import { createRNPackages } from '../RNPackagesFactory' @Builder function CustomComponentBuilder(ctx: ComponentBuilderContext) { - if (ctx.componentName === SAMPLE_VIEW_TYPE) { + if (ctx.descriptor.type === SAMPLE_VIEW_TYPE) { SampleView({ ctx: ctx.rnohContext, tag: ctx.descriptor.tag, diff --git a/zh-cn/react-native-fast-image.md b/zh-cn/react-native-fast-image.md index 1d572af51358526d1c76431a4d6c74954c554eed..89f7e7e1758d65c6b16cdcfd9e7f97422095a483 100644 --- a/zh-cn/react-native-fast-image.md +++ b/zh-cn/react-native-fast-image.md @@ -168,14 +168,14 @@ import { createRNPackages } from '../RNPackagesFactory' @Builder function CustomComponentBuilder(ctx: ComponentBuilderContext) { - if (ctx.componentName === SAMPLE_VIEW_TYPE) { + if (ctx.descriptor.type === SAMPLE_VIEW_TYPE) { SampleView({ ctx: ctx.rnohContext, tag: ctx.descriptor.tag, buildCustomComponent: CustomComponentBuilder }) } -+ else if (ctx.componentName === FAST_IMAGE_TYPE) { ++ else if (ctx.descriptor.type === FAST_IMAGE_TYPE) { + RNFastImage({ + ctx: ctx.rnohContext, + tag: ctx.descriptor.tag, diff --git a/zh-cn/react-native-linear-gradient.md b/zh-cn/react-native-linear-gradient.md index 1291c6b8e4eb687e701ab3edc3ef9658b9a8c38c..8e6d38b56258331ecec41f8c92b7472d1b23279c 100644 --- a/zh-cn/react-native-linear-gradient.md +++ b/zh-cn/react-native-linear-gradient.md @@ -183,14 +183,14 @@ import { createRNPackages } from '../RNPackagesFactory' @Builder function CustomComponentBuilder(ctx: ComponentBuilderContext) { - if (ctx.componentName === SAMPLE_VIEW_TYPE) { + if (ctx.descriptor.type === SAMPLE_VIEW_TYPE) { SampleView({ ctx: ctx.rnohContext, tag: ctx.descriptor.tag, buildCustomComponent: CustomComponentBuilder }) } -+ else if (ctx.componentName === LINEAR_GRADIENT_TYPE) { ++ else if (ctx.descriptor.type === LINEAR_GRADIENT_TYPE) { + RNLinearGradient({ + ctx: ctx.rnohContext, + tag: ctx.descriptor.tag, diff --git a/zh-cn/react-native-pager-view.md b/zh-cn/react-native-pager-view.md index 5235ec7e24dfa0293c80e145fd029c67401ecdf8..347d3f869dfaae1a87a6ce41bcb7890d0b6e919f 100644 --- a/zh-cn/react-native-pager-view.md +++ b/zh-cn/react-native-pager-view.md @@ -169,14 +169,14 @@ import { createRNPackages } from '../RNPackagesFactory' @Builder function CustomComponentBuilder(ctx: ComponentBuilderContext) { - if (ctx.componentName === SAMPLE_VIEW_TYPE) { + if (ctx.descriptor.type === SAMPLE_VIEW_TYPE) { SampleView({ ctx: ctx.rnohContext, tag: ctx.descriptor.tag, buildCustomComponent: CustomComponentBuilder }) } -+ else if (ctx.componentName === PAGER_VIEW_TYPE) { ++ else if (ctx.descriptor.type === PAGER_VIEW_TYPE) { + RNCViewPager({ + ctx: ctx.rnohContext, + tag: ctx.descriptor.tag, diff --git a/zh-cn/react-native-safe-area-context.md b/zh-cn/react-native-safe-area-context.md index 4fa64aac52ab5b92ab6e02d622dc5853c0fff408..86041f5054f4c9d15d1b956915f7d39a8eb1fbca 100644 --- a/zh-cn/react-native-safe-area-context.md +++ b/zh-cn/react-native-safe-area-context.md @@ -176,21 +176,21 @@ import { createRNPackages } from '../RNPackagesFactory' @Builder function CustomComponentBuilder(ctx: ComponentBuilderContext) { - if (ctx.componentName === SAMPLE_VIEW_TYPE) { + if (ctx.descriptor.type === SAMPLE_VIEW_TYPE) { SampleView({ ctx: ctx.rnohContext, tag: ctx.descriptor.tag, buildCustomComponent: CustomComponentBuilder }) } -+ else if (ctx.componentName === SAFE_AREA_TYPE) { ++ else if (ctx.descriptor.type === SAFE_AREA_TYPE) { + RNCSafeAreaView({ + ctx: ctx.rnohContext, + tag: ctx.descriptor.tag, + buildCustomComponent: CustomComponentBuilder + }) + } -+ else if (ctx.componentName === SAFE_AREA_PROVIDER_TYPE) { ++ else if (ctx.descriptor.type === SAFE_AREA_PROVIDER_TYPE) { + SafeAreaProvider({ + ctx: ctx.rnohContext, + tag: ctx.descriptor.tag, diff --git a/zh-cn/react-native-slider.md b/zh-cn/react-native-slider.md index c6a29ac63862d5fb87bd6e0c9559f60512ce6c76..15b9d8c8496cd6dd130607389b9f2ad711948af4 100644 --- a/zh-cn/react-native-slider.md +++ b/zh-cn/react-native-slider.md @@ -171,14 +171,14 @@ import { createRNPackages } from '../RNPackagesFactory' @Builder function CustomComponentBuilder(ctx: ComponentBuilderContext) { - if (ctx.componentName === SAMPLE_VIEW_TYPE) { + if (ctx.descriptor.type === SAMPLE_VIEW_TYPE) { SampleView({ ctx: ctx.rnohContext, tag: ctx.descriptor.tag, buildCustomComponent: CustomComponentBuilder }) } -+ else if (ctx.componentName === SLIDER_TYPE) { ++ else if (ctx.descriptor.type === SLIDER_TYPE) { + RNCSlider({ + ctx: ctx.rnohContext, + tag: ctx.descriptor.tag, diff --git a/zh-cn/react-native-svg.md b/zh-cn/react-native-svg.md index 52f4ced04baad39e34d9f88a9f1a6e5d5e14c035..9ca7ba7db8c1563ae925178b535e7f2385bebc13 100644 --- a/zh-cn/react-native-svg.md +++ b/zh-cn/react-native-svg.md @@ -173,36 +173,36 @@ import { createRNPackages } from '../RNPackagesFactory' @Builder function CustomComponentBuilder(ctx: ComponentBuilderContext) { - if (ctx.componentName === SAMPLE_VIEW_TYPE) { + if (ctx.descriptor.type === SAMPLE_VIEW_TYPE) { SampleView({ ctx: ctx.rnohContext, tag: ctx.descriptor.tag, buildCustomComponent: CustomComponentBuilder }) } -+ else if (ctx.componentName === SVG_VIEW_TYPE_NAME) { ++ else if (ctx.descriptor.type === SVG_VIEW_TYPE_NAME) { + SVGView({ + ctx: ctx.rnohContext, + tag: ctx.descriptor.tag, + buildCustomComponent: CustomComponentBuilder + }) -+ } else if (ctx.componentName === SVG_GROUP_TYPE_NAME) { ++ } else if (ctx.descriptor.type === SVG_GROUP_TYPE_NAME) { + SVGGroup({ + ctx: ctx.rnohContext, + tag: ctx.descriptor.tag, + buildCustomComponent: CustomComponentBuilder + }) -+ } else if (ctx.componentName === SVG_PATH_TYPE_NAME) { ++ } else if (ctx.descriptor.type === SVG_PATH_TYPE_NAME) { + SVGPath({ + ctx: ctx.rnohContext, + tag: ctx.descriptor.tag + }) -+ } else if (ctx.componentName === SVG_RECT_TYPE_NAME) { ++ } else if (ctx.descriptor.type === SVG_RECT_TYPE_NAME) { + SVGRect({ + ctx: ctx.rnohContext, + tag: ctx.descriptor.tag + }) -+ } else if (ctx.componentName === SVG_IMAGE_TYPE_NAME) { ++ } else if (ctx.descriptor.type === SVG_IMAGE_TYPE_NAME) { + SVGImage({ + ctx: ctx.rnohContext, + tag: ctx.descriptor.tag diff --git a/zh-cn/react-native-video.md b/zh-cn/react-native-video.md index f08b1b6e3b3052ded2b1bd18b86a48d0a6b77eb2..a50d97d62485500f337b7d97cefd477470e1186d 100644 --- a/zh-cn/react-native-video.md +++ b/zh-cn/react-native-video.md @@ -254,14 +254,14 @@ import { createRNPackages } from '../RNPackagesFactory' @Builder function CustomComponentBuilder(ctx: ComponentBuilderContext) { - if (ctx.componentName === SAMPLE_VIEW_TYPE) { + if (ctx.descriptor.type === SAMPLE_VIEW_TYPE) { SampleView({ ctx: ctx.rnohContext, tag: ctx.descriptor.tag, buildCustomComponent: CustomComponentBuilder }) } -+ else if (ctx.componentName === RNC_VIDEO_TYPE) { ++ else if (ctx.descriptor.type === RNC_VIDEO_TYPE) { + RNCVideo({ + ctx: ctx.rnohContext, + tag: ctx.descriptor.tag, diff --git a/zh-cn/react-native-webview.md b/zh-cn/react-native-webview.md index edcd8268c02061bd113f4b59dd42e6a2608f6533..244d9cd83086d80696637c375b3324d5e9f4e558 100644 --- a/zh-cn/react-native-webview.md +++ b/zh-cn/react-native-webview.md @@ -150,14 +150,14 @@ import { createRNPackages } from '../RNPackagesFactory' @Builder function CustomComponentBuilder(ctx: ComponentBuilderContext) { - if (ctx.componentName === SAMPLE_VIEW_TYPE) { + if (ctx.descriptor.type === SAMPLE_VIEW_TYPE) { SampleView({ ctx: ctx.rnohContext, tag: ctx.descriptor.tag, buildCustomComponent: CustomComponentBuilder }) } -+ else if (ctx.componentName === WEB_VIEW) { ++ else if (ctx.descriptor.type === WEB_VIEW) { + WebView({ + ctx: ctx.rnohContext, + tag: ctx.descriptor.tag,