diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md index d5e64aa4ed0af88795a26dad101c56b626aba200..4a114e4cf6ee194b927a60416e49c91e0b85f9c1 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md @@ -681,6 +681,40 @@ cacheMode(cacheMode: CacheMode) } ``` +### textZoomAtio(deprecated) + +textZoomAtio(textZoomAtio: number) + +设置页面的文本缩放百分比,默认为100%。 + +从API version 9开始不再维护,建议使用[textZoomRatio9+](#textzoomratio9)代替。 + +**参数:** + +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| ------------- | ------ | ---- | ---- | --------------- | +| textZoomAtio | number | 是 | 100 | 要设置的页面的文本缩放百分比。 | + +**示例:** + + ```ts + // xxx.ets + import web_webview from '@ohos.web.webview' + + @Entry + @Component + struct WebComponent { + controller: WebController = new WebController() + @State atio: number = 150 + build() { + Column() { + Web({ src: 'www.example.com', controller: this.controller }) + .textZoomAtio(this.atio) + } + } + } + ``` + ### textZoomRatio9+ textZoomRatio(textZoomRatio: number) @@ -2865,6 +2899,34 @@ onFaviconReceived(callback: (event: {favicon: image.PixelMap}) => void) } ``` +### onRequestSelected + +onRequestSelected(callback: () => void) + +当Web组件获得焦点时触发该回调。 + +**示例:** + + ```ts + // xxx.ets + import web_webview from '@ohos.web.webview' + + @Entry + @Component + struct WebComponent { + controller: web_webview.WebviewController = new web_webview.WebviewController() + + build() { + Column() { + Web({ src: 'www.example.com', controller: this.controller }) + .onRequestSelected(() => { + console.log('onRequestSelected') + }) + } + } + } + ``` + ## ConsoleMessage Web组件获取控制台信息对象。示例代码参考[onConsole事件](#onconsole)。