From 561c7c498664b131b3649e9e29927227d4efe8c4 Mon Sep 17 00:00:00 2001 From: yamila Date: Sat, 11 May 2024 18:12:36 +0800 Subject: [PATCH] update Signed-off-by: yamila --- .../apis-arkui/arkui-ts/ts-appendix-enums.md | 12 +++++++++++- .../arkui-ts/ts-basic-components-richeditor.md | 16 +++------------- .../arkui-ts/ts-basic-components-search.md | 16 +++------------- .../arkui-ts/ts-basic-components-textarea.md | 16 +++------------- .../arkui-ts/ts-basic-components-textinput.md | 18 ++++-------------- .../ts-universal-attributes-image-effect.md | 4 ++-- .../apis-arkui/js-apis-promptAction.md | 12 ++++++------ 7 files changed, 32 insertions(+), 62 deletions(-) diff --git a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-appendix-enums.md b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-appendix-enums.md index 153346d6bce..aadd800a2b1 100644 --- a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-appendix-enums.md +++ b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-appendix-enums.md @@ -904,4 +904,14 @@ Nullable\ { | 名称 | 描述 | | ------ | ----------------------------- | | FONT | 字体样式键。
**说明:** [TextStyle](./ts-universal-styled-string.md#textstyle)所属键。| -| GESTURE | 事件手势键。
**说明:** [GestureStyle](./ts-universal-styled-string.md#gesturestyle)所属键。| \ No newline at end of file +| GESTURE | 事件手势键。
**说明:** [GestureStyle](./ts-universal-styled-string.md#gesturestyle)所属键。| + +## MenuPolicy12+ + +菜单弹出的策略。 + +| 名称 | 值 | 描述 | +| ------- | ---- | ---------------------------------- | +| DEFAULT | 0 | 按照底层默认逻辑决定是否弹出菜单。 | +| HIDE | 1 | 始终不弹出菜单。 | +| SHOW | 2 | 始终弹出菜单。 | \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-richeditor.md b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-richeditor.md index 10d595580a8..7735f56c1f0 100644 --- a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-richeditor.md +++ b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-richeditor.md @@ -569,17 +569,7 @@ setSelection的选择项配置。 | 名称 | 类型 | 必填 | 说明 | | ---------- | ---------------------------------------- | ---- | ------- | -| menuPolicy | [MenuPolicy](#menupolicy12) | 否 | 菜单弹出的策略。 | - -## MenuPolicy12+ - -菜单弹出的策略。 - -| 名称 | 描述 | -| ---------- | ------------- | -| DEFAULT | 默认逻辑,是否弹出菜单取决于场景。 | -| NEVER | 始终不弹出菜单。 | -| ALWAYS | 始终弹出菜单。 | +| menuPolicy | [MenuPolicy](ts-appendix-enums.md#menupolicy12) | 否 | 菜单弹出的策略。 | ## TextDataDetectorConfig11+ @@ -701,7 +691,7 @@ addBuilderSpan(value: CustomBuilder, options?: RichEditorBuilderSpanOptions): nu > - 如果组件光标闪烁,插入后光标位置更新为新插入builder的后面。 通用属性仅支持[size](ts-universal-attributes-size.md#size)、[padding](ts-universal-attributes-size.md#padding)、[margin](ts-universal-attributes-size.md#margin)、[aspectRatio](ts-universal-attributes-layout-constraints.md#aspectratio)、[borderStyle](ts-universal-attributes-border.md#borderstyle)、[borderWidth](ts-universal-attributes-border.md#borderwidth)、[borderColor](ts-universal-attributes-border.md#bordercolor)、[borderRadius](ts-universal-attributes-border.md#borderradius)、[backgroundColor](ts-universal-attributes-background.md#backgroundcolor)、[backgroundBlurStyle](ts-universal-attributes-background.md#backgroundblurstyle9)、[opacity](ts-universal-attributes-opacity.md)、[blur](ts-universal-attributes-image-effect.md#blur)、[backdropBlur](ts-universal-attributes-image-effect.md#backdropblur)、[shadow](ts-universal-attributes-image-effect.md#shadow)、[grayscale](ts-universal-attributes-image-effect.md#grayscale)、[brightness](ts-universal-attributes-image-effect.md#brightness)、[saturate](ts-universal-attributes-image-effect.md#saturate)、 -[contrast](ts-universal-attributes-image-effect.md#contrast)、[invert](ts-universal-attributes-image-effect.md#invert)、[sepia](ts-universal-attributes-image-effect.md#sepia)、[hueRotate](ts-universal-attributes-image-effect.md#huerotate)、[colorBlend](ts-universal-attributes-image-effect.md#colorblend7)、[linearGradientBlur](ts-universal-attributes-image-effect.md#lineargradientblur10)、[clip](ts-universal-attributes-sharp-clipping.md#clip)、[mask](ts-universal-attributes-sharp-clipping.md#mask)、[foregroundBlurStyle](ts-universal-attributes-foreground-blur-style.md#foregroundblurstyle)、[accessibilityGroup](ts-universal-attributes-accessibility.md#accessibilitygroup)、[accessibilityText](ts-universal-attributes-accessibility.md#accessibilitytext)、[accessibilityDescription](ts-universal-attributes-accessibility.md#accessibilitydescription)、[accessibilityLevel](ts-universal-attributes-accessibility.md#accessibilitylevel)、[sphericalEffect](ts-universal-attributes-image-effect.md#sphericaleffect12)、[lightUpEffect](ts-universal-attributes-image-effect.md#lightupeffect12)、[pixelStretchEffect](ts-universal-attributes-image-effect.md#pixelstretcheffect12)。 +[contrast](ts-universal-attributes-image-effect.md#contrast)、[invert](ts-universal-attributes-image-effect.md#invert)、[sepia](ts-universal-attributes-image-effect.md#sepia)、[hueRotate](ts-universal-attributes-image-effect.md#huerotate)、[colorBlend](ts-universal-attributes-image-effect.md#colorblend7)、[linearGradientBlur](ts-universal-attributes-image-effect.md#lineargradientblur12)、[clip](ts-universal-attributes-sharp-clipping.md#clip)、[mask](ts-universal-attributes-sharp-clipping.md#mask)、[foregroundBlurStyle](ts-universal-attributes-foreground-blur-style.md#foregroundblurstyle)、[accessibilityGroup](ts-universal-attributes-accessibility.md#accessibilitygroup)、[accessibilityText](ts-universal-attributes-accessibility.md#accessibilitytext)、[accessibilityDescription](ts-universal-attributes-accessibility.md#accessibilitydescription)、[accessibilityLevel](ts-universal-attributes-accessibility.md#accessibilitylevel)、[sphericalEffect](ts-universal-attributes-image-effect.md#sphericaleffect12)、[lightUpEffect](ts-universal-attributes-image-effect.md#lightupeffect12)、[pixelStretchEffect](ts-universal-attributes-image-effect.md#pixelstretcheffect12)。 **参数:** @@ -1033,7 +1023,7 @@ SymbolSpan样式选项。 | fontFamily | [ResourceStr](ts-types.md#resourcestr) | 否 | 设置字体列表。默认字体'HarmonyOS Sans',当前支持'HarmonyOS Sans'字体和[注册自定义字体](../js-apis-font.md)。
默认字体:'HarmonyOS Sans'。
**元服务API:** 从API version 11开始,该接口支持在元服务中使用。| | decoration | {
type: [TextDecorationType](ts-appendix-enums.md#textdecorationtype),
color?: [ResourceColor](ts-types.md#resourcecolor)
} | 否 | 设置文本装饰线样式及其颜色。
默认值:{
type: TextDecorationType.None,
color: Color.Black
}。
**元服务API:** 从API version 11开始,该接口支持在元服务中使用。| | textShadow11+ | [ShadowOptions](ts-universal-attributes-image-effect.md#shadowoptions对象说明) \| Array<[ShadowOptions](ts-universal-attributes-image-effect.md#shadowoptions对象说明)> | 否 | 设置文字阴影效果。该接口支持以数组形式入参,实现多重文字阴影。
**说明:**
不支持fill字段, 不支持智能取色模式。 | -| lineHeight12+ | number \| string \| Resource | 否 |设置文本的文本行高,设置值不大于0时,不限制文本行高,自适应字体大小,number类型时单位为fp,不支持设置百分比字符串。 | +| lineHeight12+ | number \| string \| Resource | 否 |设置文本的文本行高,设置值不大于0时,不限制文本行高,自适应字体大小,number类型时单位为fp,不支持设置百分比字符串。 | | letterSpacing12+ | number \| string | 否 | 设置文本字符间距,当取值为负值时,文字会发生压缩,负值过小时会将组件内容区大小压缩为0,导致无内容显示,不支持设置百分比字符串。| | fontFeature12+ | string | 否 | 设置文字特性效果,比如数字等宽的特性。如果未设置,默认为变宽数字。设置无效字符保持默认。
格式为:normal \| \
\的格式为:\ \[ \ \| on \| off ]
\的个数可以有多个,中间用','隔开。
例如,使用等宽时钟数字的输入格式为:"ss01" on。
设置 Font Feature 属性,Font Feature 是 OpenType 字体的高级排版能力,如支持连字、数字等宽等特性,一般用在自定义字体中,其能力需要字体本身支持。
更多 Font Feature 能力介绍可参考 https://www.w3.org/TR/css-fonts-3/#font-feature-settings-prop 和 https://sparanoid.com/lab/opentype-features/ | diff --git a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-search.md b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-search.md index 7e0abd6c19b..5f46245b369 100644 --- a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-search.md +++ b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-search.md @@ -713,19 +713,9 @@ setTextSelection(selectionStart: number, selectionEnd: number, options?: Selecti setTextSelection的选中文字时的配置。 -| 名称 | 类型 | 必填 | 说明 | -| ---------- | --------------------------- | ---- | ---------------- | -| menuPolicy | [MenuPolicy](#menupolicy12) | 否 | 菜单弹出的策略。 | - -## MenuPolicy12+ - -菜单弹出的策略。 - -| 名称 | 描述 | -| ------- | ------------------------ | -| DEFAULT | 按照底层默认逻辑决定是否弹出菜单。 | -| NEVER | 始终不弹出菜单。 | -| ALWAYS | 始终弹出菜单。 | +| 名称 | 类型 | 必填 | 说明 | +| ---------- | ----------------------------------------------- | ---- | ---------------- | +| menuPolicy | [MenuPolicy](ts-appendix-enums.md#menupolicy12) | 否 | 菜单弹出的策略。 | ## KeyboardOptions12+ diff --git a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-textarea.md b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-textarea.md index 7c3b70a1712..5901db80664 100644 --- a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-textarea.md +++ b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-textarea.md @@ -687,19 +687,9 @@ setTextSelection(selectionStart: number, selectionEnd: number, options?: Selecti setTextSelection选中文字时的配置。 -| 名称 | 类型 | 必填 | 说明 | -| ---------- | --------------------------- | ---- | ---------------- | -| menuPolicy | [MenuPolicy](#menupolicy12) | 否 | 菜单弹出的策略。 | - -## MenuPolicy12+ - -菜单弹出的策略。 - -| 名称 | 描述 | -| ------- | ------------------------ | -| DEFAULT | 按照底层默认逻辑决定是否弹出菜单。 | -| NEVER | 始终不弹出菜单。 | -| ALWAYS | 始终弹出菜单。 | +| 名称 | 类型 | 必填 | 说明 | +| ---------- | ----------------------------------------------- | ---- | ---------------- | +| menuPolicy | [MenuPolicy](ts-appendix-enums.md#menupolicy12) | 否 | 菜单弹出的策略。 | ### stopEditing10+ diff --git a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-textinput.md b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-textinput.md index 50f4c78097e..0ea5a4f9d94 100644 --- a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-textinput.md +++ b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-textinput.md @@ -636,7 +636,7 @@ wordBreak(value: WordBreak) > **说明:** > > 组件不支持clip属性设置,设置该属性任意枚举值对组件文本截断无影响。 -> +> > 默认情况下,通用属性[padding](ts-universal-attributes-size.md#padding)的默认值为:
{
 top: '8vp',
 right: '16vp',
 bottom: '8vp',
 left: '16vp'
} > > 输入框开启下划线模式时,通用属性padding的默认值为:
{
 top: '12vp',
 right: '0vp',
 bottom: '12vp',
 left: '0vp'
} @@ -982,19 +982,9 @@ setTextSelection(selectionStart: number, selectionEnd: number, options setTextSelection选中文字时的配置。 -| 名称 | 类型 | 必填 | 说明 | -| ---------- | --------------------------- | ---- | ---------------- | -| menuPolicy | [MenuPolicy](#menupolicy12) | 否 | 菜单弹出的策略。 | - -## MenuPolicy12+ - -菜单弹出的策略。 - -| 名称 | 描述 | -| ------- | ------------------------ | -| DEFAULT | 按照底层默认逻辑决定是否弹出菜单。 | -| NEVER | 始终不弹出菜单。 | -| ALWAYS | 始终弹出菜单。 | +| 名称 | 类型 | 必填 | 说明 | +| ---------- | ----------------------------------------------- | ---- | ---------------- | +| menuPolicy | [MenuPolicy](ts-appendix-enums.md#menupolicy12) | 否 | 菜单弹出的策略。 | ### stopEditing10+ diff --git a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-image-effect.md b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-image-effect.md index e3345b8c682..5d32f55c6c6 100644 --- a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-image-effect.md +++ b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-image-effect.md @@ -217,7 +217,7 @@ linearGradientBlur(value: number, options: LinearGradientBlurOptions) | 参数名 | 类型 | 必填 | 说明 | | ------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | | value | number | 是 | 为模糊半径,模糊半径越大越模糊,为0时不模糊。
取值范围:[0, 60]
线性梯度模糊包含两个部分fractionStops和direction。 | -| options | [LinearGradientBlurOptions](#lineargradientbluroptions10对象说明) | 是 | 设置线性渐变模糊效果。 | +| options | [LinearGradientBlurOptions](#lineargradientbluroptions12对象说明) | 是 | 设置线性渐变模糊效果。 | ## renderGroup10+ @@ -378,7 +378,7 @@ pixelStretchEffect(options: PixelStretchEffectOptions) | COLOR | 保留源像素的饱和度和色调,但会使用目标像素的亮度来替换源像素的亮度。 | | LUMINOSITY | 保留目标像素的色调和饱和度,但会用源像素的亮度替换目标像素的亮度。 | -## LinearGradientBlurOptions10+对象说明 +## LinearGradientBlurOptions12+对象说明 | 名称 | 类型 | 必填 | 说明 | | ------------- | ----------------------------------------------------------- | ----- | ------------------------------------------------------------ | diff --git a/zh-cn/application-dev/reference/apis-arkui/js-apis-promptAction.md b/zh-cn/application-dev/reference/apis-arkui/js-apis-promptAction.md index c2e6fef2e72..87941a6a9db 100644 --- a/zh-cn/application-dev/reference/apis-arkui/js-apis-promptAction.md +++ b/zh-cn/application-dev/reference/apis-arkui/js-apis-promptAction.md @@ -510,12 +510,12 @@ closeCustomDialog(dialogId: number): void | 名称 | 类型 | 必填 | 说明 | | ------------------ | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | -| title | string \| [Resource](https://gitee.com/openharmony/docs/blob/49bb166065b063bacc2409b3bea2a53d2a2a7af9/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-types.md#resource类型)9+ | 否 | 标题文本。 | -| message | string \| [Resource](https://gitee.com/openharmony/docs/blob/49bb166065b063bacc2409b3bea2a53d2a2a7af9/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-types.md#resource类型)9+ | 否 | 内容文本。 | -| buttons | Array<[Button](https://gitee.com/openharmony/docs/blob/49bb166065b063bacc2409b3bea2a53d2a2a7af9/zh-cn/application-dev/reference/apis-arkui/js-apis-promptAction.md#button)> | 否 | 对话框中按钮的数组,结构为:{text:'button', color: '#666666'},支持大于1个按钮。 | -| alignment10+ | [DialogAlignment](https://gitee.com/openharmony/docs/blob/49bb166065b063bacc2409b3bea2a53d2a2a7af9/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-methods-alert-dialog-box.md#dialogalignment枚举说明) | 否 | 弹窗在竖直方向上的对齐方式。 默认值:DialogAlignment.Default **说明**: 若在UIExtension中设置showInSubWindow为true, 弹窗将基于UIExtension的宿主窗口对齐。 | -| offset10+ | [Offset](https://gitee.com/openharmony/docs/blob/49bb166065b063bacc2409b3bea2a53d2a2a7af9/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-types.md#offset) | 否 | 弹窗相对alignment所在位置的偏移量。 默认值:{ dx: 0 , dy: 0 } | -| maskRect10+ | [Rectangle](https://gitee.com/openharmony/docs/blob/49bb166065b063bacc2409b3bea2a53d2a2a7af9/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-methods-alert-dialog-box.md#rectangle8类型说明) | 否 | 弹窗遮蔽层区域,在遮蔽层区域内的事件不透传,在遮蔽层区域外的事件透传。 默认值:{ x: 0, y: 0, width: '100%', height: '100%' } **说明:** showInSubWindow为true时,maskRect不生效。 | +| title | string \| [Resource](arkui-ts/ts-types.md#resource类型)9+ | 否 | 标题文本。 | +| message | string \| [Resource](arkui-ts/ts-types.md#resource类型)9+ | 否 | 内容文本。 | +| buttons | Array<[Button](#button)> | 否 | 对话框中按钮的数组,结构为:{text:'button', color: '#666666'},支持大于1个按钮。 | +| alignment10+ | [DialogAlignment](arkui-ts/ts-methods-alert-dialog-box.md#dialogalignment枚举说明) | 否 | 弹窗在竖直方向上的对齐方式。 默认值:DialogAlignment.Default **说明**: 若在UIExtension中设置showInSubWindow为true, 弹窗将基于UIExtension的宿主窗口对齐。 | +| offset10+ | [Offset](arkui-ts/ts-types.md#offset) | 否 | 弹窗相对alignment所在位置的偏移量。 默认值:{ dx: 0 , dy: 0 } | +| maskRect10+ | [Rectangle](arkui-ts/ts-methods-alert-dialog-box.md#rectangle8类型说明) | 否 | 弹窗遮蔽层区域,在遮蔽层区域内的事件不透传,在遮蔽层区域外的事件透传。 默认值:{ x: 0, y: 0, width: '100%', height: '100%' } **说明:** showInSubWindow为true时,maskRect不生效。 | | showInSubWindow11+ | boolean | 否 | 某弹框需要显示在主窗口之外时,是否在子窗口显示此弹窗。 默认值:false,弹窗显示在应用内,而非独立子窗口。 **说明**:showInSubWindow为true的弹窗无法触发显示另一个showInSubWindow为true的弹窗。 | | isModal11+ | boolean | 否 | 弹窗是否为模态窗口,模态窗口有蒙层,非模态窗口无蒙层。 默认值:true,此时弹窗有蒙层。 | -- Gitee