diff --git a/zh-cn/react-native-SmartRefreshLayout.md b/zh-cn/react-native-SmartRefreshLayout.md index 6d9f23230ac8011fea3ac196539b4484ff8c363c..fd30ce5901db45734b73ce8046b0ccf5a1e7099e 100644 --- a/zh-cn/react-native-SmartRefreshLayout.md +++ b/zh-cn/react-native-SmartRefreshLayout.md @@ -18,18 +18,16 @@ -**正在 npm 发布中,当前请先从仓库[Release](https://github.com/react-native-oh-library/react-native-SmartRefreshLayout/releases)中获取库 tgz,通过使用本地依赖来安装本库。** - #### **yarn** ```bash -yarn add xxx +yarn add react-native-smartrefreshlayout@npm:@react-native-oh-tpl/react-native-smartrefreshlayout ``` #### **npm** ```bash -npm install xxx +npm install react-native-smartrefreshlayout@npm:@react-native-oh-tpl/react-native-smartrefreshlayout ``` @@ -236,29 +234,29 @@ import { createRNPackages } from '../RNPackagesFactory' @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 == SMART_REFRESH_CONTROL_TYPE){ ++ else if (ctx.componentName == SMART_REFRESH_CONTROL_TYPE){ + SmartRefreshControl({ + ctx: ctx.rnohContext, -+ tag: ctx.descriptor.tag, ++ tag: ctx.tag, + buildCustomComponent: CustomComponentBuilder + }) -+ } else if (ctx.descriptor.type == ANY_HEADER_TYPE){ ++ } else if (ctx.componentName == ANY_HEADER_TYPE){ + RNCAnyHeader({ + ctx: ctx.rnohContext, -+ tag: ctx.descriptor.tag, ++ tag: ctx.tag, + buildCustomComponent: CustomComponentBuilder + }) -+ } else if (ctx.descriptor.type == DEFAULT_HEADER_TYPE) { ++ } else if (ctx.componentName == DEFAULT_HEADER_TYPE) { + RNCDefaultHeader({ + ctx: ctx.rnohContext, -+ tag: ctx.descriptor.tag, ++ tag: ctx.tag, + buildCustomComponent: CustomComponentBuilder + }) + } diff --git a/zh-cn/react-native-video.md b/zh-cn/react-native-video.md index 893f0aa60ff20b902978e29985c4889b5e58958f..b26ec658c3b3719d10ef8af74f8446e544630341 100644 --- a/zh-cn/react-native-video.md +++ b/zh-cn/react-native-video.md @@ -1,4 +1,4 @@ -> 模板版本:v0.0.1 +> 模板版本:v0.1.1

react-native-video

@@ -18,18 +18,16 @@ -**正在 npm 发布中,当前请先从仓库[Release](https://github.com/react-native-oh-library/react-native-video/releases)中获取库 tgz,通过使用本地依赖来安装本库。** - #### **yarn** ```bash -yarn add xxx +yarn add react-native-video@npm:@react-native-oh-tpl/react-native-video ``` #### **npm** ```bash -npm install xxx +npm install react-native-video@npm:@react-native-oh-tpl/react-native-video ``` @@ -52,7 +50,7 @@ function RNCVideoDemo() { const [txt, setTxt] = useState('empty'); const [resizeMode, setResizeMode] = useState('none'); const [posterResizeMode, setPosterResizeMode] = useState('cover'); - const [seekSec, setSeekSec] = useState(5000); + const [seekSec, setSeekSec] = useState(5); const [onVideoLoad, setOnVideoLoad] = useState("onVideoLoad"); const [onVideoLoadStart, setOnVideoLoadStart] = useState("onVideoLoadStart"); @@ -72,7 +70,8 @@ function RNCVideoDemo() { padding: 0 }} > - { videoRef.current?.seek(5)}} >seek:5s + { videoRef.current?.seek(3)}} >seek:3s + { videoRef.current?.seek(5)}} >seek:5s