From fee88ba5a299d251e205672a6196aa24cd9d898c Mon Sep 17 00:00:00 2001 From: goods01 <2047190290@qq.com> Date: Wed, 10 Jul 2024 15:09:14 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20[#IABYI1]=20=E4=BF=AE=E6=94=B9react-nat?= =?UTF-8?q?ive-autoheight-webview=E6=8C=87=E5=AF=BC=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh-cn/react-native-autoheight-webview.md | 33 +++++++++++++++++++----- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/zh-cn/react-native-autoheight-webview.md b/zh-cn/react-native-autoheight-webview.md index 08075a6c..e6b08d10 100644 --- a/zh-cn/react-native-autoheight-webview.md +++ b/zh-cn/react-native-autoheight-webview.md @@ -1,5 +1,5 @@ -> 模板版本:v0.1.3 +> 模板版本:v0.2.2

react-native-autoheight-webview

@@ -44,16 +44,34 @@ yarn add @react-native-oh-tpl/react-native-autoheight-webview@file:# > [!WARNING] 使用时 import 的库名不变。 ```js -import AutoHeightWebView from "react-native-autoheight-webview"; - -; + { + console.log("onWebViewScroll", event.nativeEvent.contentOffset) + }} + onSizeUpdated={size => console.log(size.height)} + source={{ html: ` +

Tags are great for describing the essence of your story in a single word or phrase, but stories are rarely about a single thing. If I pen a story about moving across the country to start a new job in a car with my husband, two cats, a dog, and a tarantula, I wouldn’t only tag the piece with “moving”. I’d also use the tags “pets”, “marriage”, “career change”, and “travel tips”.

+ ` }} + scalesPageToFit={true} + viewportContent={'width=device-width, user-scalable=no'} + /> ``` ## Link 本库 HarmonyOS 侧实现依赖@react-native-oh-tpl/react-native-webview 的原生端代码,如已在 HarmonyOS 工程中引入过该库,则无需再次引入,可跳过本章节步骤,直接使用。 -如未引入请参照[@react-native-oh-tpl/react-native-webview 文档的 Link 章节](https://gitee.com/react-native-oh-library/usage-docs/blob/master/vmall/react-native-webview.md#link)进行引入 +如未引入请参照[@react-native-oh-tpl/react-native-webview 文档的 Link 章节](/zh-cn/react-native-webview.md)进行引入 ## 约束与限制 @@ -86,7 +104,10 @@ import AutoHeightWebView from "react-native-autoheight-webview"; ## 遗留问题 -- [ ] autoheight-webview 部分属性未实现 HarmonyOS 化[issue#1](https://github.com/react-native-oh-library/react-native-autoheight-webview/issues/1) +- [ ] autoheight-webview 暂不支持scrollEnabledWithZoomedin属性 HarmonyOS 化[issue#1](https://github.com/react-native-oh-library/react-native-autoheight-webview/issues/1) + +- [ ] AutoHeightWebview依赖的webview 部分属性未实现 HarmonyOS 化[issue#17](https://github.com/react-native-oh-library/react-native-webview/issues/17) + - [x] 中文乱码[issue#2](https://github.com/react-native-oh-library/react-native-autoheight-webview/issues/2) ## 其他 -- Gitee