From 3a60671f3b015e6331770abf0ada684401b62fe7 Mon Sep 17 00:00:00 2001 From: Louis-C7 <972339262@qq.com> Date: Thu, 16 Nov 2023 10:24:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 12591fc60..32f043157 100644 --- a/index.html +++ b/index.html @@ -27,7 +27,7 @@ el: '#main', themeColor: '#876296', // 项目名称 - name: 'RNOH三方库使用文档', + name: 'RNOH三方库说明文档', // 项目图标 // logo: '/img/icon.svg', // 仓库地址,点击右上角的Github章鱼猫头像会跳转到此地址 -- Gitee From 6e4076152cf9fa7cfaa8c01b9c5169237c6b8e7f Mon Sep 17 00:00:00 2001 From: Louis-C7 <972339262@qq.com> Date: Wed, 22 Nov 2023 17:17:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0index.ets=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh-cn/react-native-slider.md | 40 +++++++++++++++--------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/zh-cn/react-native-slider.md b/zh-cn/react-native-slider.md index e2fed193e..fd11721ff 100644 --- a/zh-cn/react-native-slider.md +++ b/zh-cn/react-native-slider.md @@ -161,31 +161,25 @@ import { SampleView, SAMPLE_VIEW_TYPE, PropsDisplayer } from "rnoh-sample-packag import { createRNPackages } from '../RNPackagesFactory' + import { RNCSlider, SLIDER_TYPE } from "rnoh-slider" -@Entry -@Component -struct Index { - @StorageLink('RNAbility') rnAbility: RNAbility | undefined = undefined - - @Builder - buildCustomComponent(ctx: ComponentBuilderContext) { - if (ctx.descriptor.type === SAMPLE_VIEW_TYPE) { - SampleView({ - ctx: ctx.rnohContext, - tag: ctx.descriptor.tag, - buildCustomComponent: this.buildCustomComponent.bind(this) - }) - } -+ else if (ctx.descriptor.type === SLIDER_TYPE) { -+ RNCSlider({ -+ ctx: ctx.rnohContext, -+ tag: ctx.descriptor.tag, -+ buildCustomComponent: this.buildCustomComponent.bind(this) -+ }) -+ } - ... +@Builder +function CustomComponentBuilder(ctx: ComponentBuilderContext) { + if (ctx.componentName === SAMPLE_VIEW_TYPE) { + SampleView({ + ctx: ctx.rnohContext, + tag: ctx.descriptor.tag, + buildCustomComponent: CustomComponentBuilder + }) } - ... ++ else if (ctx.componentName === SLIDER_TYPE) { ++ RNCSlider({ ++ ctx: ctx.rnohContext, ++ tag: ctx.descriptor.tag, ++ buildCustomComponent: CustomComponentBuilder ++ }) ++ } + ... } +... ``` ### 运行 -- Gitee