From c698491f60fadbe6a198a20c9f6016a9577c509b Mon Sep 17 00:00:00 2001 From: zhufenghao Date: Wed, 21 Dec 2022 14:32:56 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90web=E3=80=91=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=9C=80=E6=B1=82=E6=96=B0=E5=A2=9E=E6=9C=80?= =?UTF-8?q?=E5=B0=8F=E9=80=BB=E8=BE=91=E5=AD=97=E4=BD=93=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?doc=E4=BB=93=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhufenghao --- .../arkui-ts/ts-basic-components-web.md | 40 +++++++++++++++++-- 1 file changed, 36 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 c1d315d8ad..cf2eb1a6a0 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 @@ -707,13 +707,13 @@ blockNetwork(block: boolean) defaultFixedFontSize(size: number) -设置网页的默认固定字体大小。 +设置网页的默认等宽字体大小。 **参数:** | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | ------ | -------- | ---- | ------ | ---------------------------- | -| size | number | 是 | 13 | 设置网页的默认固定字体大小。入参限制为1到72之间的非负整数,小于1的数固定为1,超过72的数固定为72。 | +| size | number | 是 | 13 | 设置网页的默认等宽字体大小,单位px。输入值的范围为-2^31到2^31-1,实际渲染时超过72的值按照72进行渲染,低于1的值按照1进行渲染。 | **示例:** @@ -744,7 +744,7 @@ defaultFontSize(size: number) | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | ------ | -------- | ---- | ------ | ------------------------ | -| size | number | 是 | 16 | 设置网页的默认字体大小。入参限制为1到72之间的非负整数,小于1的数固定为1,超过72的数固定为72。 | +| size | number | 是 | 16 | 设置网页的默认字体大小,单位px。输入值的范围为-2^31到2^31-1,实际渲染时超过72的值按照72进行渲染,低于1的值按照1进行渲染。 | **示例:** @@ -775,7 +775,7 @@ minFontSize(size: number) | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | ------ | -------- | ---- | ------ | ------------------------ | -| size | number | 是 | 8 | 设置网页字体大小最小值。入参限制为1到72之间的非负整数,小于1的数固定为1,超过72的数固定为72。 | +| size | number | 是 | 8 | 设置网页字体大小最小值,单位px。输入值的范围为-2^31到2^31-1,实际渲染时超过72的值按照72进行渲染,低于1的值按照1进行渲染。 | **示例:** @@ -796,6 +796,38 @@ minFontSize(size: number) } ``` +### minLogicalFontSize9+ + +minLogicalFontSize(size: number) + +设置网页逻辑字体大小最小值。 + +**参数:** + +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| ------ | -------- | ---- | ------ | ------------------------ | +| size | number | 是 | 8 | 设置网页逻辑字体大小最小值,单位px。输入值的范围为-2^31到2^31-1,实际渲染时超过72的值按照72进行渲染,低于1的值按照1进行渲染。 | + +**示例:** + + ```ts + // xxx.ets + import web_webview from '@ohos.web.webview' + @Entry + @Component + struct WebComponent { + controller: web_webview.WebviewController = new web_webview.WebviewController() + @State size: number = 13 + build() { + Column() { + Web({ src: 'www.example.com', controller: this.controller }) + .minLogicalFontSize(this.size) + } + } + } + ``` + + ### webFixedFont9+ webFixedFont(family: string) -- GitLab