From 21968f45d7c777358cad210a7c583d4ccc893965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AC=A7=E9=98=B3=E6=99=BA?= <1742104739@qq.com> Date: Tue, 5 Dec 2023 18:47:54 +0800 Subject: [PATCH] =?UTF-8?q?[Issues:=20#I8M142]=20fast-image=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=86=85=E5=AE=B9=EF=BC=8Cwebview=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh-cn/react-native-fast-image.md | 19 ++++++++++++++++++- zh-cn/react-native-webview.md | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/zh-cn/react-native-fast-image.md b/zh-cn/react-native-fast-image.md index e1c9b2bd..b5df1ed2 100644 --- a/zh-cn/react-native-fast-image.md +++ b/zh-cn/react-native-fast-image.md @@ -185,6 +185,23 @@ function CustomComponentBuilder(ctx: ComponentBuilderContext) { ... ``` +### 在 ArkTs 侧引入 FastImagePackage + +打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: + +```diff +import type {RNPackageContext, RNPackage} from 'rnoh/ts'; +import {SamplePackage} from 'rnoh-sample-package/ts'; ++ import { FastImagePackage } from 'rnoh-fast-image/ts'; + +export function createRNPackages(ctx: RNPackageContext): RNPackage[] { + return [ + new SamplePackage(ctx), ++ new FastImagePackage(ctx) + ]; +} +``` + ### 运行 点击右上角的 `sync` 按钮 @@ -231,7 +248,7 @@ ohpm install ## 遗留问题 -- [ ] 部分涉及使用缓存能力的接口,未适配 +- [ ] 部分涉及使用缓存能力的接口[issue#8](https://github.com/react-native-oh-library/react-native-fast-image/issues/8) ## 其他 diff --git a/zh-cn/react-native-webview.md b/zh-cn/react-native-webview.md index 081d41dc..ecbcfe7a 100644 --- a/zh-cn/react-native-webview.md +++ b/zh-cn/react-native-webview.md @@ -223,7 +223,7 @@ ohpm install | `showsVerticalScrollIndicator` | Boolean value that determines whether a vertical scroll indicator is shown in the WebView. | boolean | No | iOS,android,macOS | yes | | `cacheEnabled?` | Sets whether WebView should use browser caching. | boolean | No | iOS,android,macOS | yes | | `cacheMode?` | Overrides the way the cache is used. | string | No | android | yes | -| `textZoom?` | If the user has set a custom font size in the Android system, an undesirable scale of the site interface in WebView occurs. | number | yes | android | yes | +| `textZoom?` | If the user has set a custom font size in the Android system, an undesirable scale of the site interface in WebView occurs. | number | No | android | yes | | ` injectJavaScript?: (script: string) => void` | Executes the JavaScript string. | function | No | iOS,android,macOS | yes | | ` onLoadEnd?: (event) => void` | Function that is invoked when the WebView load succeeds or fails used. | function | No | All | yes | | ` onMessage?: (event) => void` | Function that is invoked when the webview calls window.ReactNativeWebView.postMessage. | function | No | iOS,android,macOS | yes | -- Gitee