From 229080fff2b34be9f3b99de5030abb8364b478ac Mon Sep 17 00:00:00 2001 From: "wudefeng@huawei.com" Date: Tue, 10 Jan 2023 17:31:20 +0800 Subject: [PATCH] add setresponseready and pinchsmooth Signed-off-by: wudefeng@huawei.com --- .../arkui-ts/ts-basic-components-web.md | 50 +++++++++++++++++-- 1 file changed, 46 insertions(+), 4 deletions(-) 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 1f5c45dffa..34bc94a3a3 100755 --- 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 @@ -1181,6 +1181,36 @@ forceDarkAccess(access: boolean) } ``` +### pinchSmooth9+ + +pinchSmooth(isEnabled: boolean) + +设置网页是否开启捏合流畅模式。 + +**参数:** + +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| --------- | -------- | ---- | ------ | -------------------------- | +| isEnabled | boolean | 是 | false | 网页是否开启捏合流畅模式。 | + +**示例:** + + ```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 }) + .pinchSmooth(true) + } + } +} + ``` + ## 事件 不支持通用事件。 @@ -3030,15 +3060,15 @@ getResponseMimeType(): string ### setResponseData9+ -setResponseData(data: string) +setResponseData(data: string | number) 设置资源响应数据。 **参数:** -| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | -| ---- | ------ | ---- | ---- | ----------- | -| data | string | 是 | - | 要设置的资源响应数据。 | +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| ------ | ---------------- | ---- | ------ | ------------------------------------------------------------ | +| data | string \| number | 是 | - | 要设置的资源响应数据。string表示输入类型是字符串,number表示输入类型是文件句柄。 | ### setResponseEncoding9+ @@ -3100,6 +3130,18 @@ setResponseCode(code: number) | ---- | ------ | ---- | ---- | ------------- | | code | number | 是 | - | 要设置的资源响应的状态码。 | +### setResponseIsReady9+ + +setResponseIsReady(IsReady: boolean) + +设置资源响应数据是否已经就绪。 + +**参数:** + +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| ------- | -------- | ---- | ------ | -------------------------- | +| IsReady | boolean | 是 | true | 资源响应数据是否已经就绪。 | + ## FileSelectorResult9+ 通知Web组件的文件选择结果。示例代码参考[onShowFileSelector事件](#onshowfileselector9)。 -- GitLab