From e9045f34f3aedb336442ab63505409187e8c0d52 Mon Sep 17 00:00:00 2001 From: hebingxue <1014948665@qq.com> Date: Fri, 23 Sep 2022 09:55:47 +0800 Subject: [PATCH] pattern fix Signed-off-by: hebingxue <1014948665@qq.com> --- .../reference/arkui-ts/ts-animatorproperty.md | 19 +-- .../arkui-ts/ts-basic-components-blank.md | 2 +- .../arkui-ts/ts-basic-components-button.md | 52 ++++----- .../arkui-ts/ts-basic-components-checkbox.md | 2 +- .../ts-basic-components-checkboxgroup.md | 2 +- .../arkui-ts/ts-basic-components-datapanel.md | 26 ++--- .../ts-basic-components-datepicker.md | 36 +++--- .../arkui-ts/ts-basic-components-divider.md | 10 +- .../ts-basic-components-imageanimator.md | 46 ++++---- .../ts-basic-components-loadingprogress.md | 2 +- .../arkui-ts/ts-basic-components-marquee.md | 2 +- .../ts-basic-components-navigation.md | 4 +- .../ts-basic-components-patternlock.md | 12 +- .../arkui-ts/ts-basic-components-progress.md | 2 +- .../arkui-ts/ts-basic-components-qrcode.md | 4 +- .../ts-basic-components-remotewindow.md | 8 +- .../arkui-ts/ts-basic-components-richtext.md | 17 +-- .../arkui-ts/ts-basic-components-search.md | 12 +- .../arkui-ts/ts-basic-components-select.md | 18 +-- .../arkui-ts/ts-basic-components-span.md | 3 +- .../arkui-ts/ts-basic-components-stepper.md | 13 +-- .../arkui-ts/ts-basic-components-text.md | 24 ++-- .../arkui-ts/ts-basic-components-textarea.md | 3 +- .../arkui-ts/ts-basic-components-textclock.md | 19 ++- .../arkui-ts/ts-basic-components-textinput.md | 9 +- .../arkui-ts/ts-basic-components-texttimer.md | 22 ++-- .../arkui-ts/ts-basic-components-toggle.md | 34 +++--- .../ts-basic-components-xcomponent.md | 11 +- .../arkui-ts/ts-methods-alert-dialog-box.md | 51 +++++---- ...niversal-attributes-backgroundBlurStyle.md | 22 ++-- .../arkui-ts/ts-universal-attributes-click.md | 6 +- .../ts-universal-attributes-component-id.md | 108 +++++++++--------- .../ts-universal-attributes-gradient-color.md | 15 +-- .../arkui-ts/ts-universal-attributes-grid.md | 15 +-- ...-universal-attributes-hit-test-behavior.md | 25 ++-- .../ts-universal-attributes-hover-effect.md | 12 +- .../arkui-ts/ts-universal-attributes-menu.md | 6 +- .../ts-universal-attributes-overlay.md | 14 +-- .../arkui-ts/ts-universal-attributes-popup.md | 42 +++---- .../ts-universal-attributes-sharp-clipping.md | 13 +-- .../ts-universal-attributes-text-style.md | 20 ++-- .../ts-universal-attributes-touch-target.md | 16 +-- .../ts-universal-attributes-transformation.md | 19 ++- .../ts-universal-attributes-visibility.md | 14 +-- 44 files changed, 377 insertions(+), 435 deletions(-) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-animatorproperty.md b/zh-cn/application-dev/reference/arkui-ts/ts-animatorproperty.md index d026aafb2b..eb045448b7 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-animatorproperty.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-animatorproperty.md @@ -3,6 +3,7 @@ 组件的某些通用属性变化时,可以通过属性动画实现渐变效果,提升用户体验。支持的属性包括width、height、backgroundColor、opacity、scale、rotate、translate等。 > **说明:** +> > 从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 animation(value: {duration?: number, tempo?: number, curve?: string | Curve | ICurve, delay?:number, iterations: number, playMode?: PlayMode, onFinish?: () => void}) @@ -12,15 +13,15 @@ animation(value: {duration?: number, tempo?: number, curve?: string | Curve | IC **参数:** -| 名称 | 参数类型 | 必填 | 描述 | -| ---------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | -| duration | number | 否 | 设置动画时长。单位为毫秒,默认动画时长为1000毫秒。
默认值:1000 | -| tempo | number | 否 | 动画播放速度。数值越大,动画播放速度越快,数值越小,播放速度越慢
值为0时,表示不存在动画。
默认值:1 | -| curve | string \| [Curve](ts-appendix-enums.md#curve) \| ICurve9+ | 否 | 设置动画曲线。默认曲线为线性。
默认值:Curve.Linear | -| delay | number | 否 | 设置动画延迟执行的时长。单位为毫秒,默认不延时播放。
默认值:0 | -| iterations | number | 否 | 设置播放次数。默认播放一次,设置为-1时表示无限次播放。
默认值:1 | -| playMode | [PlayMode](ts-appendix-enums.md#playmode) | 否 | 设置动画播放模式,默认播放完成后重头开始播放。
默认值:PlayMode.Normal | -| onFinish | () => void | 否 | 状态回调,动画播放完成时触发。 | +| 名称 | 参数类型 | 必填 | 描述 | +| ---------- | ------------------------------------------| ---- | ------------------------------------------------------------ | +| duration | number | 否 | 设置动画时长。单位为毫秒,默认动画时长为1000毫秒。
默认值:1000 | +| tempo | number | 否 | 动画播放速度。数值越大,动画播放速度越快,数值越小,播放速度越慢
值为0时,表示不存在动画。
默认值:1 | +| curve | string \| [Curve](ts-appendix-enums.md#curve) \| ICurve9+ | 否 | 设置动画曲线。默认曲线为线性。
默认值:Curve.Linear | +| delay | number | 否 | 设置动画延迟执行的时长。单位为毫秒,默认不延时播放。
默认值:0 | +| iterations | number | 否 | 设置播放次数。默认播放一次,设置为-1时表示无限次播放。
默认值:1 | +| playMode | [PlayMode](ts-appendix-enums.md#playmode) | 否 | 设置动画播放模式,默认播放完成后重头开始播放。
默认值:PlayMode.Normal | +| onFinish | () => void | 否 | 状态回调,动画播放完成时触发。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-blank.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-blank.md index 6a7dcbaac6..6cea1b82c6 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-blank.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-blank.md @@ -28,7 +28,7 @@ Blank(min?: number | string) | 名称 | 参数类型 | 描述 | | -------- | -------- | -------- | -| color | [ResourceColor](ts-types.md) | 设置空白填充的填充颜色。 | +| color | [ResourceColor](ts-types.md#resourcecolor8) | 设置空白填充的填充颜色。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-button.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-button.md index 15d38d0db5..a1d98a58a5 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-button.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-button.md @@ -3,14 +3,10 @@ 按钮组件,可快速创建不同样式的按钮。 > **说明:** +> > 该组件从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -## 权限列表 - -无 - - ## 子组件 可以包含单个子组件。 @@ -18,41 +14,41 @@ ## 接口 -- Button(options?: {type?: ButtonType, stateEffect?: boolean}) +**方法1:** Button(options?: {type?: ButtonType, stateEffect?: boolean}) - **表1** options参数说明 +**参数:** - | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | - | ----------- | ---------- | ---- | ------- | --------------------------------- | - | type | ButtonType | 否 | ButtonType.Capsule | 描述按钮风格。 | - | stateEffect | boolean | 否 | true | 按钮按下时是否开启切换效果,当状态置为false时,点击效果关闭。 | +| 参数名 | 参数类型 | 必填 | 参数描述 | +| ----------- | ---------- | ------| --------------------------------- | +| type | ButtonType | 否 | 描述按钮风格。
默认值:ButtonType.Capsule | +| stateEffect | boolean | 否 | 按钮按下时是否开启切换效果,当状态置为false时,点击效果关闭。
默认值:true | -- Button(label?: ResourceStr, options?: { type?: ButtonType, stateEffect?: boolean }) +**方法2:**Button(label?: ResourceStr, options?: { type?: ButtonType, stateEffect?: boolean }) 使用文本内容创建相应的按钮组件,此时Button无法包含子组件。 - **表2** value参数说明 +**参数:** - | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | - | ------- | ----------------------------------- | ---- | ---- | ------------- | - | label | [ResourceStr](ts-types.md#resourcestr) | 否 | - | 按钮文本内容。 | - | options | Object | 否 | - | 见options参数说明。 | + | 参数名 | 参数类型 | 必填 | 参数描述 | + | ------- | ----------------------------------- | ---- | ------------- | + | label | [ResourceStr](ts-types.md#resourcestr) | 否 | 按钮文本内容。 | + | options | Object | 否 | 见options参数说明。 | ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| ----------- | ---------- | ------- | --------------------------------- | -| type | ButtonType | ButtonType.Capsule | 设置Button样式。 | -| stateEffect | boolean | true | 状态切换时是否开启切换效果,当状态置为false时,点击效果关闭。 | - -- ButtonType枚举说明 - | 名称 | 描述 | - | ------- | ------------------ | - | Capsule | 胶囊型按钮(圆角默认为高度的一半)。 | - | Circle | 圆形按钮。 | - | Normal | 普通按钮(默认不带圆角)。 | +| 名称 | 参数类型 | 描述 | +| ----------- | ----------- | --------------------------------- | +| type | ButtonType | 设置Button样式。
默认值:ButtonType.Capsule | +| stateEffect | boolean | 状态切换时是否开启切换效果,当状态置为false时,点击效果关闭。
默认值:true | + +## ButtonType枚举说明 +| 名称 | 描述 | +| ------- | ------------------ | +| Capsule | 胶囊型按钮(圆角默认为高度的一半)。 | +| Circle | 圆形按钮。 | +| Normal | 普通按钮(默认不带圆角)。 | > **说明:** > - 按钮圆角通过[通用属性borderRadius设置](ts-universal-attributes-border.md)(不支持通过border接口设置圆角)。 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkbox.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkbox.md index df1680060f..b45c15c828 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkbox.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkbox.md @@ -29,7 +29,7 @@ Checkbox(options?: {name?: string, group?: string }) | 名称 | 参数类型 | 描述 | | ------------- | ------- | -------- | | select | boolean | 设置多选框是否选中。
默认值:false | -| selectedColor | [ResourceColor](ts-types.md) | 设置多选框选中状态颜色。 | +| selectedColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置多选框选中状态颜色。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkboxgroup.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkboxgroup.md index f84d889932..102366ffde 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkboxgroup.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkboxgroup.md @@ -31,7 +31,7 @@ CheckboxGroup(options?: { group?: string }) | 名称 | 参数类型 | 描述 | | -------- | -------- | -------- | | selectAll | boolean | 设置是否全选。
默认值:false | -| selectedColor | [ResourceColor](ts-types.md) | 设置被选中或部分选中状态的颜色。 | +| selectedColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置被选中或部分选中状态的颜色。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-datapanel.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-datapanel.md index 2d29d796f3..c099110818 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-datapanel.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-datapanel.md @@ -7,9 +7,6 @@ > 该组件从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -## 权限列表 - -无 ## 子组件 @@ -21,19 +18,20 @@ DataPanel(options:{values: number[], max?: number, type?: DataPanelType}) -- 参数 - | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | - | -------- | -------- | -------- | -------- | -------- | - | values | number[] | 是 | - | 数据值列表,最大支持9个数据。 | - | max | number | 否 | 100 | - max大于0,表示数据的最大值。
- max小于等于0,max等于value数组各项的和,按比例显示。 | - | type8+ | DataPanelType | 否 | DataPanelType.Circle | 数据面板的类型。 | +**参数:** + +| 参数名 | 参数类型 | 必填 | 参数描述 | +| ----------------- | -------- | ----- | -------- | +| values | number[] | 是 | 数据值列表,最大支持9个数据。 | +| max | number | 否 | - max大于0,表示数据的最大值。
- max小于等于0,max等于value数组各项的和,按比例显示。
默认值:100 | +| type8+ | DataPanelType | 否 | 数据面板的类型。
默认值:DataPanelType.Circle | -- DataPanelType枚举说明 - | 名称 | 描述 | - | -------- | -------- | - | Line | 线型数据面板。 | - | Circle | 环形数据面板。 | +## DataPanelType枚举说明 +| 名称 | 描述 | +| -------| ------------ | +| Line | 线型数据面板。 | +| Circle | 环形数据面板。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-datepicker.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-datepicker.md index 575806e26c..defe3b0419 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-datepicker.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-datepicker.md @@ -1,15 +1,14 @@ # DatePicker +选择日期的滑动选择器组件 + > **说明:** +> > 该组件从API Version 8开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -选择日期的滑动选择器组件。 - -## 权限列表 -无 ## 子组件 @@ -24,18 +23,18 @@ DatePicker(options?: {start?: Date, end?: Date, selected?: Date}) 根据指定范围的Date创建可以选择日期的滑动选择器。 **参数:** - | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | - | -------- | -------- | -------- | -------- | -------- | - | start | Date | 否 | Date('1970-1-1') | 指定选择器的起始日期。 | - | end | Date | 否 | Date('2100-12-31') | 指定选择器的结束日期。 | - | selected | Date | 否 | 当前系统日期 | 设置选中项的日期。 | +| 参数名 | 参数类型 | 必填 | 参数描述 | +| -------- | -------- | ------------- | -------- | +| start | Date | 否 | 指定选择器的起始日期。
默认值:Date('1970-1-1') | +| end | Date | 否 | 指定选择器的结束日期。
默认值:Date('2100-12-31') | +| selected | Date | 否 | 设置选中项的日期。
默认值:当前系统日期 | ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| -------- | -------- | -------- | -------- | -| lunar | boolean | false | 日期是否显示农历。
- true:展示农历。
- false:不展示农历。 | +| 名称 | 参数类型 | 描述 | +| ------| -------------- | -------- | +| lunar | boolean | 日期是否显示农历。
- true:展示农历。
- false:不展示农历。
默认值:false | ## 事件 @@ -44,12 +43,13 @@ DatePicker(options?: {start?: Date, end?: Date, selected?: Date}) | -------- | -------- | | onChange(callback: (value: DatePickerResult) => void) | 选择日期时触发该事件。 | -### DatePickerResult对象说明 - | 名称 | 参数类型 | 描述 | - | -------- | -------- | -------- | - | year | number | 选中日期的年。 | - | month | number | 选中日期的月(0~11),0表示1月,11表示12月。 | - | day | number | 选中日期的日。 | +## DatePickerResult对象说明 + +| 名称 | 参数类型 | 描述 | +| -------- | -------- | -------- | +| year | number | 选中日期的年。 | +| month | number | 选中日期的月(0~11),0表示1月,11表示12月。 | +| day | number | 选中日期的日。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-divider.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-divider.md index 53ad72fc1f..82e848df1a 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-divider.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-divider.md @@ -20,12 +20,12 @@ Divider() 除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性: -| 名称 | 参数类型 | 描述 | -| -------- | -------- | -------- | -| vertical | boolean | 使用水平分割线还是垂直分割线。false:水平分割线;true:垂直分割线。
默认值:false | -| color | [ResourceColor](ts-types.md) | 分割线颜色。 | +| 名称 | 参数类型 | 描述 | +| ----------- | ---------- | ------------------ | +| vertical | boolean | 使用水平分割线还是垂直分割线。false:水平分割线;true:垂直分割线。
默认值:false | +| color | [ResourceColor](ts-types.md#resourcecolor8) | 分割线颜色。 | | strokeWidth | number \| string | 分割线宽度。
默认值:1 | -| lineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | 分割线的端点样式。
默认值:LineCapStyle.Butt | +| lineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | 分割线的端点样式。
默认值:LineCapStyle.Butt | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-imageanimator.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-imageanimator.md index 97635bb4f1..930327514b 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-imageanimator.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-imageanimator.md @@ -1,15 +1,12 @@ # ImageAnimator -> **说明:** -> 该组件从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 - - 提供帧动画组件来实现逐帧播放图片的能力,可以配置需要播放的图片列表,每张图片可以配置时长。 +> **说明:** +> +> 该组件从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -## 权限列表 -无 ## 子组件 @@ -24,26 +21,27 @@ ImageAnimator() ## 属性 -| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | -| -------- | -------- | -------- | -------- | -------- | -| images | Array<ImageFrameInfo> | [] | 是 | 设置图片帧信息集合。每一帧的帧信息(ImageFrameInfo)包含图片路径、图片大小、图片位置和图片播放时长信息,详见ImageFrameInfo属性说明。 | -| state | [AnimationStatus](ts-appendix-enums.md#animationstatus) | Initial | 否 | 默认为初始状态,用于控制播放状态。 | -| duration | number | 1000 | 否 | 单位为毫秒,默认时长为1000ms;duration为0时,不播放图片;值的改变只会在下一次循环开始时生效;当images中任意一帧图片设置了单独的duration后,该属性设置无效。 | -| reverse | boolean | false | 否 | 设置播放顺序。false表示从第1张图片播放到最后1张图片; true表示从最后1张图片播放到第1张图片。 | -| fixedSize | boolean | true | 否 | 设置图片大小是否固定为组件大小。 true表示图片大小与组件大小一致,此时设置图片的width 、height 、top 和left属性是无效的。false表示每一张图片的width 、height 、top和left属性都要单独设置。 | -| preDecode | number | 0 | 否 | 是否启用预解码,默认值为0,即不启用预解码,如该值设为2,则播放当前页时会提前加载后面两张图片至缓存以提升性能。 | -| fillMode | [FillMode](ts-appendix-enums.md#fillmode) | Forwards | 否 | 设置动画开始前和结束后的状态,可选值参见FillMode说明。 | -| iterations | number | 1 | 否 | 默认播放一次,设置为-1时表示无限次播放。 | +| 参数名称 | 参数类型 | 必填 | 参数描述 | +| ---------- | ----------------------- | -------- | -------- | +| images | Array<ImageFrameInfo> | 是 | 设置图片帧信息集合。每一帧的帧信息(ImageFrameInfo)包含图片路径、图片大小、图片位置和图片播放时长信息,详见ImageFrameInfo属性说明。
默认值:[] | +| state | [AnimationStatus](ts-appendix-enums.md#animationstatus) | 否 | 默认为初始状态,用于控制播放状态。
默认值:Initial | +| duration | number | 否 | 单位为毫秒,默认时长为1000ms;duration为0时,不播放图片;值的改变只会在下一次循环开始时生效;当images中任意一帧图片设置了单独的duration后,该属性设置无效。
默认值:1000 | +| reverse | boolean | 否 | 设置播放顺序。false表示从第1张图片播放到最后1张图片; true表示从最后1张图片播放到第1张图片。
默认值:false | +| fixedSize | boolean | 否 | 设置图片大小是否固定为组件大小。 true表示图片大小与组件大小一致,此时设置图片的width 、height 、top 和left属性是无效的。false表示每一张图片的width 、height 、top和left属性都要单独设置。
默认值:true | +| preDecode | number | 否 | 是否启用预解码,默认值为0,即不启用预解码,如该值设为2,则播放当前页时会提前加载后面两张图片至缓存以提升性能。
默认值:0 | +| fillMode | [FillMode](ts-appendix-enums.md#fillmode) | 否 | 设置动画开始前和结束后的状态,可选值参见FillMode说明。
默认值:Forwards | +| iterations | number | 否 | 默认播放一次,设置为-1时表示无限次播放。
默认值:1 | - ImageFrameInfo属性说明 - | 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | - | -------- | -------- | -------- | -------- | -------- | - | src | string \| [Resource](ts-types.md#resource类型)9+ | "" | 是 | 图片路径,图片格式为svg,png和jpg,从API Version9开始支持[Resource](ts-types.md#resource类型)类型的路径 | - | width | [Length](ts-types.md#长度类型) | 0 | 否 | 图片宽度 | - | height | [Length](ts-types.md#长度类型) | 0 | 否 | 图片高度 | - | top | [Length](ts-types.md#长度类型) | 0 | 否 | 图片相对于组件左上角的纵向坐标 | - | left | [Length](ts-types.md#长度类型) | 0 | 否 | 图片相对于组件左上角的横向坐标 | - | duration | number | 0 | 否 | 每一帧图片的播放时长,单位毫秒 | + +| 参数名称 | 参数类型 | 必填 | 参数描述 | +| -------- | -------------- | -------- | -------- | +| src | string \| [Resource](ts-types.md#resource)9+ | 是 | 图片路径,图片格式为svg,png和jpg,从API Version9开始支持[Resource](ts-types.md#resource类型)类型的路径。
默认值:"" | +| width | [Length](ts-types.md#length) | 否 | 图片宽度。
默认值:0 | +| height | [Length](ts-types.md#length) | 否 | 图片高度。
默认值:0 | +| top | [Length](ts-types.md#length) | 否 | 图片相对于组件左上角的纵向坐标。
默认值:0 | +| left | [Length](ts-types.md#length) | 否 | 图片相对于组件左上角的横向坐标。
默认值:0 | +| duration | number | 否 | 每一帧图片的播放时长,单位毫秒。
默认值:0 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-loadingprogress.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-loadingprogress.md index 506ff40553..64946210fb 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-loadingprogress.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-loadingprogress.md @@ -21,7 +21,7 @@ LoadingProgress() | 名称 | 参数类型 | 描述 | | -------- | -------- | -------- | -| color | [ResourceColor](ts-types.md) | 设置加载进度条前景色。 | +| color | [ResourceColor](ts-types.md#resourcecolor8) | 设置加载进度条前景色。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-marquee.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-marquee.md index e1bb411247..26d0695400 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-marquee.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-marquee.md @@ -84,7 +84,7 @@ struct MarqueeExample { Button('start') .onClick(() => { this.start = true - }) + }) .width(200) .height(60) .margin({bottom:20}) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-navigation.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-navigation.md index 78a7eb4ceb..a63597995d 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-navigation.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-navigation.md @@ -24,9 +24,9 @@ Navigation() | 名称 | 参数类型 | 描述 | | -------------- | ---------------------------------------- | ---------------------------------------- | -| title | string \| [CustomBuilder](ts-types.md) | 页面标题。 | +| title | string \| [CustomBuilder](ts-types.md#custombuilder8)8+ | 页面标题。 | | subTitle | string | 页面副标题。 | -| menus | Array8+ | 页面右上角菜单。 | +| menus | Array8+ | 页面右上角菜单。 | | titleMode | NavigationTitleMode | 页面标题栏显示模式。
默认值:NavigationTitleMode.Free | | toolBar | object \| [CustomBuilder](ts-types.md#custombuilder8)8+ | 设置工具栏内容。
items: 工具栏所有项。 | | hideToolBar | boolean | 设置隐藏/显示工具栏:
默认值:false
true: 隐藏工具栏。
false: 显示工具栏。 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-patternlock.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-patternlock.md index 27ba28ae07..e782823e14 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-patternlock.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-patternlock.md @@ -26,12 +26,12 @@ PatternLock(controller?: PatternLockController) | 名称 | 参数类型 | 描述 | | --------------- | ------------------------------------- | ------------------------------------------------------------ | -| sideLength | [Length](ts-types.md) | 设置组件的宽度和高度(相同值)。最小可以设置为0。
默认值:300vp | -| circleRadius | [Length](ts-types.md) | 设置宫格圆点的半径。
默认值:14vp | -| regularColor | [ResourceColor](ts-types.md) | 设置宫格圆点在“未选中”状态的填充颜色。
默认值:Color.Black | -| selectedColor | [ResourceColor](ts-types.md) | 设置宫格圆点在“选中”状态的填充颜色。
默认值:Color.Black | -| activeColor | [ResourceColor](ts-types.md) | 设置宫格圆点在“激活”状态的填充颜色。
默认值:Color.Black | -| pathColor | [ResourceColor](ts-types.md) | 设置连线的颜色。
默认值:Color.Blue | +| sideLength | [Length](ts-types.md#length) | 设置组件的宽度和高度(相同值)。最小可以设置为0。
默认值:300vp | +| circleRadius | [Length](ts-types.md#length) | 设置宫格圆点的半径。
默认值:14vp | +| regularColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置宫格圆点在“未选中”状态的填充颜色。
默认值:Color.Black | +| selectedColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置宫格圆点在“选中”状态的填充颜色。
默认值:Color.Black | +| activeColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置宫格圆点在“激活”状态的填充颜色。
默认值:Color.Black | +| pathColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置连线的颜色。
默认值:Color.Blue | | pathStrokeWidth | number \| string | 设置连线的宽度。最小可以设置为0。
默认值:34vp | | autoReset | boolean | 设置是否支持用户在完成输入后再次触屏重置组件状态。如果设置为true,用户可以通过触摸图案密码锁重置组件状态(清除之前的输入效果);如果设置为false,用户手指离开屏幕完成输入后,再次触摸图案密码锁(包括圆点)不能改变之前的输入状态。
默认值:true | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-progress.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-progress.md index 2e46582a93..05676739ed 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-progress.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-progress.md @@ -52,7 +52,7 @@ Progress(options: {value: number, total?: number, type?: ProgressType}) | 名称 | 参数类型 | 描述 | | -------- | -------- | -------- | | value | number | 设置当前进度值。 | -| color | [ResourceColor](ts-types.md) | 设置进度条前景色。 | +| color | [ResourceColor](ts-types.md#resourcecolor8) | 设置进度条前景色。 | | style8+ | {
strokeWidth?: [Length](ts-types.md#length),
scaleCount?: number,
scaleWidth?: [Length](ts-types.md#length)
} | 定义组件的样式。
- strokeWidth: 设置进度条宽度。
- scaleCount: 设置环形进度条总刻度数。
- scaleWidth: 设置环形进度条刻度粗细,刻度粗细大于进度条宽度时,为系统默认粗细。 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-qrcode.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-qrcode.md index 6fce76e885..6f5c02d1ca 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-qrcode.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-qrcode.md @@ -27,8 +27,8 @@ QRCode(value: string) | 名称 | 参数类型 | 描述 | | -------- | -------- | -------- | -| color | [ResourceColor](ts-types.md) | 设置二维码颜色。
默认值:Color.Black | -| backgroundColor | [ResourceColor](ts-types.md) | 设置二维码背景颜色。
默认值:Color.White | +| color | [ResourceColor](ts-types.md#resourcecolor8) | 设置二维码颜色。
默认值:Color.Black | +| backgroundColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置二维码背景颜色。
默认值:Color.White | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-remotewindow.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-remotewindow.md index e16c320d2a..52f18fce48 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-remotewindow.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-remotewindow.md @@ -18,10 +18,10 @@ RemoteWindow(target: WindowAnimationTarget) 通过窗口动画对象创建组件。 -- 参数 - | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | - | -------- | -------- | -------- | -------- | -------- | - | target | [WindowAnimationTarget](#windowanimationtarget) | 是 | - | 需要控制的动画窗口的描述。 | +**参数:** +| 参数名 | 参数类型 | 必填 | 参数描述 | +| -------- | -------- | --------------- | -------- | +| target | [WindowAnimationTarget](#windowanimationtarget) | 是 | 需要控制的动画窗口的描述。 | ## WindowAnimationTarget 目标窗口,用来远程控制实现动画。 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md index ae8b911928..b87cb34ec1 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md @@ -1,13 +1,12 @@ # RichText +富文本组件,解析并显示HTML格式文本。 + > **说明:** +> > 该组件从API Version 8开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -富文本组件,解析并显示HTML格式文本。 - -## 权限列表 -无 ## 子组件 @@ -17,11 +16,11 @@ RichText(content:string) -- 参数 +**参数:** - | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | - | -------- | -------- | -------- | -------- | -------- | - | content | string | 是 | - | 表示HTML格式的字符串。 | +| 参数名 | 参数类型 | 必填 | 参数描述 | +| ------- | -------- | ------------- | -------- | +| content | string | 是 | 表示HTML格式的字符串。 | ## 事件 @@ -48,7 +47,9 @@ RichText(content:string) | \ | 用于定义客户端文本,比如JavaScript。 | \ | ## 示例 + 示例效果请以真机运行为准,当前IDE预览器不支持。 + ```ts // xxx.ets @Entry diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-search.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-search.md index b0154381cb..264877fc57 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-search.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-search.md @@ -29,12 +29,12 @@ Search(options?: { value?: string; placeholder?: string; icon?: string; controll | 名称 | 参数类型 | 描述 | | ----------------------- | ------------------------------------------------ | ---------------------------------------------- | -| searchButton | string | 搜索框末尾搜索按钮文本值,默认无搜索按钮。 | -| placeholderColor | [ResourceColor](ts-types.md) | 设置placeholder颜色。 | -| placeholderFont | [Font](ts-types.md) | 设置placeholder文本样式。 | -| textFont | [Font](ts-types.md) | 设置搜索框内文本样式。 | -| copyOption9+ | [CopyOptions](ts-appendix-enums.md#copyoptions9) | 设置文本是否可复制。 | -| textAlign | [TextAlign](ts-appendix-enums.md#textalign) | 设置文本对齐方式。
默认值:TextAlign.Start | +| searchButton | string | 搜索框末尾搜索按钮文本值,默认无搜索按钮。 | +| placeholderColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置placeholder颜色。 | +| placeholderFont | [Font](ts-types.md#font) | 设置placeholder文本样式。 | +| textFont | [Font](ts-types.md#font) | 设置搜索框内文本样式。 | +| copyOption9+ | [CopyOptions](ts-appendix-enums.md#copyoptions9) | 设置文本是否可复制。 | +| textAlign | [TextAlign](ts-appendix-enums.md#textalign) | 设置文本对齐方式。
默认值:TextAlign.Start | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-select.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-select.md index 4aca58d909..6245b9f125 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-select.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-select.md @@ -27,20 +27,20 @@ Select(options: Array\) | ----------------------- | ------------------------------------- | --------------------------------------------- | | selected | number | 设置下拉菜单初始选项的索引,第一项的索引为0。 | | value | string | 设置下拉按钮本身的文本显示。 | -| font | [Font](ts-types.md) | 设置下拉按钮本身的文本样式。 | -| fontColor | [ResourceColor](ts-types.md) | 设置下拉按钮本身的文本颜色。 | -| selectedOptionBgColor | [ResourceColor](ts-types.md) | 设置下拉菜单选中项的背景色。 | -| selectedOptionFont | [Font](ts-types.md) | 设置下拉菜单选中项的文本样式。 | -| selectedOptionFontColor | [ResourceColor](ts-types.md) | 设置下拉菜单选中项的文本颜色。 | -| optionBgColor | [ResourceColor](ts-types.md) | 设置下拉菜单项的背景色。 | -| optionFont | [Font](ts-types.md) | 设置下拉菜单项的文本样式。 | -| optionFontColor | [ResourceColor](ts-types.md) | 设置下拉菜单项的文本颜色。 | +| font | [Font](ts-types.md#font) | 设置下拉按钮本身的文本样式。 | +| fontColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置下拉按钮本身的文本颜色。 | +| selectedOptionBgColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置下拉菜单选中项的背景色。 | +| selectedOptionFont | [Font](ts-types.md#font) | 设置下拉菜单选中项的文本样式。 | +| selectedOptionFontColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置下拉菜单选中项的文本颜色。 | +| optionBgColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置下拉菜单项的背景色。 | +| optionFont | [Font](ts-types.md#font) | 设置下拉菜单项的文本样式。 | +| optionFontColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置下拉菜单项的文本颜色。 | ## 事件 | 名称 | 功能描述 | | ---------------------------------------- | -------------------------------------- | -| onSelect(callback: (index: number, value?:string) => void) | 下拉菜单选中某一项的回调。index:选中项的索引。value:选中项的值。 | +| onSelect(callback: (index: number, value?:string) => void) | 下拉菜单选中某一项的回调。
index:选中项的索引。
value:选中项的值。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md index 9705defef7..a28e6bc203 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md @@ -23,10 +23,9 @@ Span(value: string | Resource) | value | string \| [Resource](ts-types.md#resource) | 是 | 文本内容。 | - ## 属性 -通用属性方法仅支持通用文本样式,不支持触摸热区设置。 +通用属性方法仅支持[通用文本样式](ts-universal-attributes-text-style.md),不支持[触摸热区设置](ts-universal-attributes-touch-target.md)。 | 名称 | 参数类型 | 描述 | | -------- | -------- | -------- | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-stepper.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-stepper.md index 96049969c5..2fef65d34d 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-stepper.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-stepper.md @@ -4,12 +4,10 @@ > **说明:** +> > 该组件从API Version 8开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -## 权限列表 - -无 ## 子组件 @@ -22,10 +20,11 @@ Stepper(value?: { index?: number }) -- 参数 - | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | - | -------- | -------- | -------- | -------- | -------- | - | index | number | 否 | 0 | 设置步骤导航器显示第几个StepperItem。 | +**参数:** + +| 参数名 | 参数类型 | 必填 | 参数描述 | +| ------| -------- | --------------- | -------- | +| index | number | 否 | 设置步骤导航器显示第几个StepperItem。
默认值:0 | ## 属性 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md index a8f3a429ea..c6af75c5c2 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md @@ -26,18 +26,18 @@ Text(content?: string | Resource) 除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性: -| 名称 | 参数类型 | 描述 | -| -------- | -------- | -------- | -| textAlign | [TextAlign](ts-appendix-enums.md#textalign) | 设置多行文本的文本对齐方式。
默认值:TextAlign.Start | -| textOverflow | {overflow: [TextOverflow](ts-appendix-enums.md#textoverflow)} | 设置文本超长时的显示方式。
默认值:{overflow: TextOverflow.Clip}
**说明:**
文本截断是按字截断。例如,英文以单词为最小单位进行截断,若需要以字母为单位进行截断,可在字母间添加零宽空格:\u200B。
需配合`maxLines`使用,单独设置不生效。 | -| maxLines | number | 设置文本的最大行数。
默认值:Infinity
**说明:**
默认情况下,文本是自动折行的,如果指定此参数,则文本最多不会超过指定的行。如果有多余的文本,可以通过 `textOverflow`来指定截断方式。 | -| lineHeight | string \| number \| [Resource](ts-types.md) | 设置文本的文本行高,设置值不大于0时,不限制文本行高,自适应字体大小,Length为number类型时单位为fp。 | -| decoration | {
type: TextDecorationType,
color?: [ResourceColor](ts-types.md)
} | 设置文本装饰线样式及其颜色。
默认值:{
type: TextDecorationType.None,
color:Color.Black
} | -| baselineOffset | number \| string | 设置文本基线的偏移量。 | -| letterSpacing | number \| string | 设置文本字符间距。 | -| minFontSize | number \| string \| [Resource](ts-types.md) | 设置文本最小显示字号。 | -| maxFontSize | number \| string \| [Resource](ts-types.md) | 设置文本最大显示字号。 | -| textCase | [TextCase](ts-appendix-enums.md#textcase) | 设置文本大小写。
默认值:TextCase.Normal | +| 名称 | 参数类型 | 描述 | +| ----------------------- | ----------------------------------- | ------------------------------------------- | +| textAlign | [TextAlign](ts-appendix-enums.md#textalign) | 设置多行文本的文本对齐方式。
默认值:TextAlign.Start | +| textOverflow | {overflow: [TextOverflow](ts-appendix-enums.md#textoverflow)} | 设置文本超长时的显示方式。
默认值:{overflow: TextOverflow.Clip}
**说明:**
文本截断是按字截断。例如,英文以单词为最小单位进行截断,若需要以字母为单位进行截断,可在字母间添加零宽空格:\u200B。
需配合`maxLines`使用,单独设置不生效。 | +| maxLines | number | 设置文本的最大行数。
默认值:Infinity
**说明:**
默认情况下,文本是自动折行的,如果指定此参数,则文本最多不会超过指定的行。如果有多余的文本,可以通过 `textOverflow`来指定截断方式。 | +| lineHeight | string \| number \| [Resource](ts-types.md#resource) | 设置文本的文本行高,设置值不大于0时,不限制文本行高,自适应字体大小,Length为number类型时单位为fp。 | +| decoration | {
type: TextDecorationType,
color?: [ResourceColor](ts-types.md#resourcecolor8)
} | 设置文本装饰线样式及其颜色。
默认值:{
type: TextDecorationType.None,
color:Color.Black
} | +| baselineOffset | number \| string | 设置文本基线的偏移量。 | +| letterSpacing | number \| string | 设置文本字符间距。 | +| minFontSize | number \| string \| [Resource](ts-types.md#resource) | 设置文本最小显示字号。 | +| maxFontSize | number \| string \| [Resource](ts-types.md#resource) | 设置文本最大显示字号。 | +| textCase | [TextCase](ts-appendix-enums.md#textcase) | 设置文本大小写。
默认值:TextCase.Normal | | copyOption9+ | [CopyOptions](ts-appendix-enums.md#copyoptions9) | 组件支持设置文本是否可复制粘贴。
默认值:CopyOptions.None | > **说明:** diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md index 215493908d..e9155e11fa 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md @@ -36,7 +36,8 @@ TextArea(value?:{placeholder?: ResourceStr, text?: ResourceStr, controller?: Tex | textAlign | [TextAlign](ts-appendix-enums.md#textalign) | 设置文本水平对齐式。
默认值:TextAlign.Start | | caretColor | [ResourceColor](ts-types.md#resourcecolor) | 设置输入框光标颜色。 | | inputFilter8+ | {
value: [ResourceStr](ts-types.md#resourcestr),
error?: (value: string) => void
} | 通过正则表达式设置输入过滤器。满足表达式的输入允许显示,不满足的输入被忽略。仅支持单个字符匹配,不支持字符串匹配。例如:^(?=.\*\d)(?=.\*[a-z])(?=.\*[A-Z]).{8,10}$,不支持过滤8到10位的强密码。
- value:设置正则表达式。
- error:正则匹配失败时,返回被忽略的内容。 | -| copyOption9+ | [CopyOptions](ts-appendix-enums.md#copyoptions9) | 设置文本是否可复制。 | +| copyOption9+ | [CopyOptions](ts-appendix-enums.md#copyoptions9) | 设置文本是否可复制。 | + ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textclock.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textclock.md index 1cc4843459..32e9c42932 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textclock.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textclock.md @@ -3,12 +3,9 @@ TextClock组件通过文本将当前系统时间显示在设备上。支持不同时区的时间显示,最高精度到秒级。 >**说明:** +> >该组件从API Version 8开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -## 权限列表 - -无 - ## 子组件 无 @@ -19,18 +16,18 @@ TextClock(options?: { timeZoneOffset?: number, controller?: TextClockController **参数:** -| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | -| -------- | -------- | ---- | ------------------ | ------------------------------------------------------------ | -| timeZoneOffset | number | 否 | 当前系统的时区偏移量 | 设置时区偏移量。
取值范围为[-14, 12],表示东十二区到西十二区,其中负值表示东时区,正值表示西时区,比如东八区为-8。
对横跨国际日界线的国家或地区,用-13(UTC+13)和-14(UTC+14)来保证整个国家或者区域处在相同的时间,当设置的值不在取值范围内时,将使用当前系统的时区偏移量。 | -| controller | [TextClockController](#textclockcontroller) | 否 | null | 绑定一个控制器,用来控制文本时钟的状态。| +| 参数名 | 参数类型 | 必填 | 参数描述 | +| -------------- | -------- | ------ | --------------------------------------------------------------------------- | +| timeZoneOffset | number | 否 | 设置时区偏移量。
取值范围为[-14, 12],表示东十二区到西十二区,其中负值表示东时区,正值表示西时区,比如东八区为-8。
对横跨国际日界线的国家或地区,用-13(UTC+13)和-14(UTC+14)来保证整个国家或者区域处在相同的时间,当设置的值不在取值范围内时,将使用当前系统的时区偏移量。
默认值:当前系统的时区偏移量 | +| controller | [TextClockController](#textclockcontroller) | 否 | 绑定一个控制器,用来控制文本时钟的状态。
默认值:null| ## 属性 除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性: -| 名称 | 参数类型 | 默认值 | 描述 | -| ------ | -------- | -------- | ------------------------------------------------------------ | -| format | string | 'hms' | 设置显示时间格式。
日期间隔符固定为"/",时间间隔符为":"。
如yyyyMMdd,yyyy-MM-dd显示为yyyy/MM/dd,
hhmmss显示为hh:mm:ss。
时间格式只用写一位即可,如"hhmmss"等同于"hms"。
支持的时间格式化字符串:
- YYYY/yyyy:完整年份。
- YY/yy:年份后两位。
- M:月份(若想使用01月则使用MM)。
- d:日期(若想使用01日则使用dd)。
- D:年中日(一年中的第几天)。
- H:24小时制。
- h:12小时制。
- m:分钟。
- s:秒。
- SSS:毫秒。| +| 名称 | 参数类型 | 描述 | +| ------ | --------------- | ------------------------------------------------------------ | +| format | string | 设置显示时间格式。
日期间隔符固定为"/",时间间隔符为":"。
如yyyyMMdd,yyyy-MM-dd显示为yyyy/MM/dd,
hhmmss显示为hh:mm:ss。
时间格式只用写一位即可,如"hhmmss"等同于"hms"。
支持的时间格式化字符串:
- YYYY/yyyy:完整年份。
- YY/yy:年份后两位。
- M:月份(若想使用01月则使用MM)。
- d:日期(若想使用01日则使用dd)。
- D:年中日(一年中的第几天)。
- H:24小时制。
- h:12小时制。
- m:分钟。
- s:秒。
- SSS:毫秒。
默认值: 'hms'| ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textinput.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textinput.md index d7d594618b..5833752dd9 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textinput.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textinput.md @@ -20,6 +20,7 @@ TextInput(value?:{placeholder?: ResourceStr, text?: ResourceStr, controller?: Te | 参数名 | 参数类型 | 必填 | 参数描述 | | ----------------------- | ---------------------------------------- | ---- | --------------- | +<<<<<<< Updated upstream | placeholder | [ResourceStr](ts-types.md#resourcestr) | 否 | 无输入时的提示文本。 | | text | [ResourceStr](ts-types.md#resourcestr) | 否 | 设置输入框当前的文本内容。 | | controller8+ | [TextInputController](#textinputcontroller8) | 否 | 设置TextInput控制器。 | @@ -32,12 +33,16 @@ TextInput(value?:{placeholder?: ResourceStr, text?: ResourceStr, controller?: Te | 名称 | 参数类型 | 描述 | | ------------------------ | ---------------------------------------- | ---------------------------------------- | | type | InputType | 设置输入框类型。
默认值:InputType.Normal | -| placeholderColor | [ResourceColor](ts-types.md) | 设置placeholder颜色。| +| placeholderColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置placeholder颜色。| | placeholderFont | [Font](ts-types.md#font) | 设置placeholder文本样式。 | | enterKeyType | EnterKeyType | 设置输入法回车键类型。
默认值:EnterKeyType.Done | -| caretColor | [ResourceColor](ts-types.md) | 设置输入框光标颜色。 | +| caretColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置输入框光标颜色。 | | maxLength | number | 设置文本的最大输入字符数。 | +<<<<<<< Updated upstream | inputFilter8+ | {
value: [ResourceStr](ts-types.md#resourcestr),
error?: (value: string) => void
} | 正则表达式,满足表达式的输入允许显示,不满足正则表达式的输入被忽略。仅支持单个字符匹配,不支持字符串匹配。例如:^(?=.\*\d)(?=.\*[a-z])(?=.\*[A-Z]).{8,10}$,8到10位的强密码不支持过滤。
- value:设置正则表达式。
- error:正则匹配失败时,返回被忽略的内容。 | +======= +| inputFilter8+ | {
value: [ResourceStr](ts-types.md#resourcestr8)8+,
error?: (value: string) => void
} | 正则表达式,满足表达式的输入允许显示,不满足正则表达式的输入被忽略。仅支持单个字符匹配,不支持字符串匹配。例如:^(?=.\*\d)(?=.\*[a-z])(?=.\*[A-Z]).{8,10}$,8到10位的强密码不支持过滤。
- value:设置正则表达式。
- error:正则匹配失败时,返回被忽略的内容。 | +>>>>>>> Stashed changes | copyOption9+ | [CopyOptions](ts-appendix-enums.md#copyoptions9) | 设置文本是否可复制。 | | showPasswordIcon9+ | boolean | 密码输入模式时,密码框末尾的图标是否显示。
默认值:true | | style9+ | TextInputStyle | TextInput风格。
默认值:TextInputStyle.Default | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-texttimer.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-texttimer.md index 35eccd1c4f..993fc551a8 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-texttimer.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-texttimer.md @@ -3,12 +3,11 @@ 通过文本显示计时信息并控制其计时器状态的组件。 > **说明:** +> > 该组件从API Version 8开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -## 权限列表 -无 ## 子组件 @@ -20,18 +19,19 @@ TextTimer(options?: { isCountDown?: boolean, count?: number, controller?: TextTimerController }) -- 参数 - | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | - | -------- | -------- | -------- | -------- | -------- | - | isCountDown | boolean | 否 | false | 是否倒计时。 | - | count | number | 否 | 60000 | 倒计时时间(isCountDown为true时生效),单位为毫秒。
- count<=0时,使用默认值为倒计时初始值。
- count>0时,count值为倒计时初始值。 | - | controller | [TextTimerController](#texttimercontroller) | 否 | - | TextTimer控制器。 | +**参数:** + +| 参数名 | 参数类型 | 必填 | 参数描述 | +| ----------- | -------- | -------- | -------- | -------- | +| isCountDown | boolean | 否 | 是否倒计时。
默认值:false | +| count | number | 否 | 倒计时时间(isCountDown为true时生效),单位为毫秒。
- count<=0时,使用默认值为倒计时初始值。
- count>0时,count值为倒计时初始值。
默认值:60000 | +| controller | [TextTimerController](#texttimercontroller) | 否 | TextTimer控制器。 | ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| -------- | -------- | -------- | -------- | -| format | string | 'hh:mm:ss.ms' | 自定义格式,需至少包含一个hh、mm、ss、ms中的关键字。 | +| 名称 | 参数类型 | 描述 | +| -------- | ---------------------- | ---------------------- | +| format | string | 自定义格式,需至少包含一个hh、mm、ss、ms中的关键字。
默认值:'hh:mm:ss.ms' | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-toggle.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-toggle.md index a892b4533c..d13acdb540 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-toggle.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-toggle.md @@ -3,12 +3,11 @@ 组件提供勾选框样式、状态按钮样式及开关样式。 > **说明:** +> > 该组件从API Version 8开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -## 权限列表 -无 ## 子组件 @@ -20,27 +19,28 @@ Toggle(options: { type: ToggleType, isOn?: boolean }) -- 参数 - | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | - | -------- | -------- | -------- | -------- | -------- | - | type | ToggleType | 是 | - | 开关类型。 | - | isOn | boolean | 否 | false | 开关是否打开,true:打开,false:关闭。 | +**参数:** +| 参数名 | 参数类型 | 必填 | 参数描述 | +| ---- | ---------- | -----| -------------- | +| type | ToggleType | 是 | 开关类型。 | +| isOn | boolean | 否 | 开关是否打开,true:打开,false:关闭。
默认值:false | -- ToggleType枚举说明 - | 名称 | 描述 | - | -------- | -------- | - | Checkbox | 提供单选框样式。
> **说明:**
> [通用属性padding](ts-universal-attributes-size.md)的默认值为:
{
 top: 14 vp,
 right: 6 vp,
 bottom: 14 vp,
 left: 6 vp
} | - | Button | 提供状态按钮样式,如果子组件有文本设置,则相应的文本内容会显示在按钮内部。 | - | Switch | 提供开关样式。
> **说明:**
> [通用属性padding](ts-universal-attributes-size.md)默认值为:
{
 top: 12 vp,
 right: 12 vp,
 bottom: 12 vp,
 left: 12 vp
} | + +## ToggleType枚举说明 +| 名称 | 描述 | +| -------- | ---------------- | +| Checkbox | 提供单选框样式。
> **说明:**
> [通用属性padding](ts-universal-attributes-size.md)的默认值为:
{
 top: 14 vp,
 right: 6 vp,
 bottom: 14 vp,
 left: 6 vp
} | +| Button | 提供状态按钮样式,如果子组件有文本设置,则相应的文本内容会显示在按钮内部。 | +| Switch | 提供开关样式。
> **说明:**
> [通用属性padding](ts-universal-attributes-size.md)默认值为:
{
 top: 12 vp,
 right: 12 vp,
 bottom: 12 vp,
 left: 12 vp
} | ## 属性 -| 名称 | 参数 | 默认值 | 参数描述 | -| -------- | -------- | -------- | -------- | -| selectedColor | [ResourceColor](ts-types.md) | - | 设置组件打开状态的背景颜色。 | -| switchPointColor | [ResourceColor](ts-types.md) | - | 设置Switch类型的圆形滑块颜色。
> **说明:**
> 仅对type为ToggleType.Switch生效。 | +| 名称 | 参数 | 参数描述 | +| ---------------- | --------------------------- | ---------------------- | +| selectedColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置组件打开状态的背景颜色。 | +| switchPointColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置Switch类型的圆形滑块颜色。
> **说明:**
> 仅对type为ToggleType.Switch生效。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-xcomponent.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-xcomponent.md index 9dcda24971..a46b23d875 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-xcomponent.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-xcomponent.md @@ -1,14 +1,13 @@ # XComponent - > **说明:** +可用于EGL/OpenGLES和媒体数据写入,并显示在XComponent组件。 - > 该组件从API Version 8 开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 +> **说明:** +> +> 该组件从API Version 8 开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 - 可用于EGL/OpenGLES和媒体数据写入,并显示在XComponent组件。 + -## 权限列表 - - 无 ## 子组件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-methods-alert-dialog-box.md b/zh-cn/application-dev/reference/arkui-ts/ts-methods-alert-dialog-box.md index 6cd1b910e0..976ada5acf 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-methods-alert-dialog-box.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-methods-alert-dialog-box.md @@ -3,40 +3,41 @@ 显示警告弹窗组件,可设置文本内容与响应回调。 > **说明:** +> > 从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 ## 属性 -| 名称 | 参数类型 | 默认值 | 参数描述 | -| -------- | -------- | -------- | -------- | -| show | AlertDialogParamWithConfirm \| AlertDialogParamWithButtons | - | 定义并显示AlertDialog组件。 | +<<<<<<< Updated upstream +| 名称 | 参数类型 | 参数描述 | +| ---- | --------------- | -------- | +| show | AlertDialogParamWithConfirm \| AlertDialogParamWithButtons | 定义并显示AlertDialog组件。 | ## AlertDialogParamWithConfirm对象说明 - | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | - | -------- | -------- | -------- | -------- | -------- | - | title | [ResourceStr](ts-types.md#resourcestr) | 否 | - | 弹窗标题。 | - | message | [ResourceStr](ts-types.md#resourcestr) | 是 | - | 弹窗内容。 | - | autoCancel | boolean | 否 | true | 点击遮障层时,是否关闭弹窗。 | - | confirm | {
value: string \| [Resource](ts-types.md#resource类型),
fontColor?: Color \| number \| string \| [Resource](ts-types.md#resource类型),
backgroundColor?: Color \| number \| string \| [Resource](ts-types.md#resource类型),
action: () => void
} | 否 | - | 确认按钮的文本内容、文本色、按钮背景色和点击回调。 | - | cancel | () => void | 否 | - | 点击遮障层关闭dialog时的回调。 | - | alignment | [DialogAlignment](ts-methods-custom-dialog-box.md) | 否 | DialogAlignment.Default | 弹窗在竖直方向上的对齐方式。 | - | offset | [Offset](ts-types.md#offset) | 否 | - | 弹窗相对alignment所在位置的偏移量。 | - | gridCount | number | 否 | - | 弹窗容器宽度所占用栅格数。 | +| 参数名 | 参数类型 | 必填 | 参数描述 | +| ---------- | ---------------- | ---------- | ------------------------------- | +| title | [ResourceStr](ts-types.md#resourcestr) | 否 | 弹窗标题。 | +| message | [ResourceStr](ts-types.md#resourcestr) | 是 | 弹窗内容。 | +| autoCancel | boolean | 否 | 点击遮障层时,是否关闭弹窗。
默认值:true | +| confirm | {
value: string \| [Resource](ts-types.md#resource),
fontColor?: Color \| number \| string \| [Resource](ts-types.md#resource),
backgroundColor?: Color \| number \| string \| [Resource](ts-types.md#resource),
action: () => void
} | 否 | 确认按钮的文本内容、文本色、按钮背景色和点击回调。 | +| cancel | () => void | 否 | 点击遮障层关闭dialog时的回调。 | +| alignment | [DialogAlignment](ts-methods-custom-dialog-box.md) | 否 | 弹窗在竖直方向上的对齐方式。
默认值:DialogAlignment.Default | +| offset | [Offset](ts-types.md#offset) | 否 | 弹窗相对alignment所在位置的偏移量。 | +| gridCount | number | 否 | 弹窗容器宽度所占用栅格数。 | ## AlertDialogParamWithButtons对象说明 - | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | - | -------- | -------- | -------- | -------- | -------- | - | title | [ResourceStr](ts-types.md#resourcestr) | 否 | - | 弹窗标题。 | - | message | [ResourceStr](ts-types.md#resourcestr) | 是 | - | 弹窗内容。 | - | autoCancel | boolean | 否 | true | 点击遮障层时,是否关闭弹窗。 | - | primaryButton | {
value: string \| [Resource](ts-types.md#resource类型),
fontColor?: Color \| number \| string \| [Resource](ts-types.md#resource类型),
backgroundColor?: Color \| number \| string \| [Resource](ts-types.md#resource类型),
action: () => void;
} | 否 | - | 按钮的文本内容、文本色、按钮背景色和点击回调。 | - | secondaryButton | {
value: string \| [Resource](ts-types.md#resource类型),
fontColor?: Color \| number \| string \| [Resource](ts-types.md#resource类型),
backgroundColor?: Color \| number \| string \| [Resource](ts-types.md#resource类型),
action: () => void;
} | 否 | - | 按钮的文本内容、文本色、按钮背景色和点击回调。 | - | cancel | () => void | 否 | - | 点击遮障层关闭dialog时的回调。 | - | alignment | [DialogAlignment](ts-methods-custom-dialog-box.md) | 否 | DialogAlignment.Default | 弹窗在竖直方向上的对齐方式。 | - | offset | [Offset](ts-types.md#offset) | 否 | - | 弹窗相对alignment所在位置的偏移量。 | - | gridCount | number | 否 | - | 弹窗容器宽度所占用栅格数。 | - +| 参数名 | 参数类型 | 必填 | 参数描述 | +| --------------- | ---------------------- | ------------ | --------------------- | +| title | [ResourceStr](ts-types.md#resourcestr) | 否 | 弹窗标题。 | +| message | [ResourceStr](ts-types.md#resourcestr) | 是 | 弹窗内容。 | +| autoCancel | boolean | 否 | 点击遮障层时,是否关闭弹窗。
默认值:true | +| primaryButton | {
value: string \| [Resource](ts-types.md#resource),
fontColor?: Color \| number \| string \| [Resource](ts-types.md#resource),
backgroundColor?: Color \| number \| string \| [Resource](ts-types.md#resource),
action: () => void;
} | 否 | 按钮的文本内容、文本色、按钮背景色和点击回调。 | +| secondaryButton | {
value: string \| [Resource](ts-types.md#resource),
fontColor?: Color \| number \| string \| [Resource](ts-types.md#resource),
backgroundColor?: Color \| number \| string \| [Resource](ts-types.md#resource),
action: () => void;
} | 否 | 按钮的文本内容、文本色、按钮背景色和点击回调。 | +| cancel | () => void | 否 | 点击遮障层关闭dialog时的回调。 | +| alignment | [DialogAlignment](ts-methods-custom-dialog-box.md) | 否 | 弹窗在竖直方向上的对齐方式。
默认值:DialogAlignment.Default | +| offset | [Offset](ts-types.md#offset) | 否 | 弹窗相对alignment所在位置的偏移量。 | +| gridCount | number | 否 | 弹窗容器宽度所占用栅格数。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-backgroundBlurStyle.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-backgroundBlurStyle.md index b53e7ca746..8ed865870f 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-backgroundBlurStyle.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-backgroundBlurStyle.md @@ -6,25 +6,19 @@ > >从API Version 9开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -## 权限列表 - -无 - ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| ------------ | ------------- | ----------------------- | ------------------------ | -| backgroundBlurStyle | [BlurStyle](#blurstyle) | - | 为当前组件提供一种在背景和内容之间的模糊能力,入参为模糊材质。 +| 名称 | 参数类型 | 描述 | +| -------------------- | ----------------------- | ------------------------ | +| backgroundBlurStyle | [BlurStyle](#blurstyle) | 为当前组件提供一种在背景和内容之间的模糊能力,入参为模糊材质。| ## BlurStyle - | 名称 | 描述 | - | ------ | ----------------------------------------------- | - | Thin | 轻薄材质。 | - | Regular | 普通厚度材质。 | - | Thick | 厚材质。 | - - + | 名称 | 描述 | + | ------- | ---------- | + | Thin | 轻薄材质。 | + | Regular | 普通厚度材质。 | + | Thick | 厚材质。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-click.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-click.md index 6891a6f12b..d1610c4254 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-click.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-click.md @@ -10,9 +10,9 @@ ## 属性 -| **名称** | **参数类型** | **默认值** | **描述** | -| --------- | -------- | ------- | -------------- | -| touchable | boolean | true | 设置当前组件是否可以响应点击事件、触摸事件等手指交互事件。 | +| **名称** | **参数类型** | **描述** | +| ----------- | -------- | ------------------------ | +| touchable | boolean | 设置当前组件是否可以响应点击事件、触摸事件等手指交互事件。
默认值:true | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-component-id.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-component-id.md index 5c09e56615..173e31e41a 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-component-id.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-component-id.md @@ -3,19 +3,15 @@ id为组件的唯一标识,在整个应用内唯一。本模块提供组件标识相关接口,可以获取指定id组件的属性,也提供向指定id组件发送事件的功能。 > **说明:** +> > 从API Version 8开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -## 权限列表 - -无 - - ## 属性 -| 名称 | 参数说明 | 默认值 | 描述 | -| -------- | -------- | -------- | -------- | -| id | string | '' | 组件的唯一标识,唯一性由使用者保证。 | +| 名称 | 参数说明 | 描述 | +| -----| -------- | ----------------------------- | +| id | string | 组件的唯一标识,唯一性由使用者保证。
默认值:' '| ## 接口 @@ -27,15 +23,17 @@ getInspectorByKey(id: string): string 获取指定id的组件的所有属性,不包括子组件信息。 -- 参数 - | 参数 | 类型 | 必填 | 默认值 | 描述 | - | -------- | -------- | -------- | -------- | -------- | - | id | string | 是 | - | 要获取属性的组件id。 | +**参数:** + +| 参数 | 类型 | 必填 | 描述 | +| ---- | -------- | ---- | -------------| +| id | string | 是 | 要获取属性的组件id。 | -- 返回值 - | 类型 | 描述 | - | -------- | -------- | - | string | 组件属性列表的JSON字符串。 | +**返回值:** + +| 类型 | 描述 | +| -------| -------------- | +| string | 组件属性列表的JSON字符串。 | ### getInspectorTree9+ @@ -43,11 +41,11 @@ getInspectorTree(): string 获取组件树及组件属性。 -- 返回值 +**返回值:** - | 类型 | 描述 | - | ------ | ---------------------------------- | - | string | 组件树及组件属性列表的JSON字符串。 | +| 类型 | 描述 | +| ------ | --------------------------- | +| string | 组件树及组件属性列表的JSON字符串。 | ### sendEventByKey9+ @@ -55,17 +53,19 @@ sendEventByKey(id: string, action: number, params: string): boolean 给指定id的组件发送事件。 -- 参数 - | 参数 | 类型 | 必填 | 默认值 | 描述 | - | -------- | -------- | -------- | -------- | -------- | - | id | string | 是 | - | 要触发事件的组件的id。 | - | action | number | 是 | - | 要触发的事件类型,目前支持取值:
- 点击事件Click: 10
- 长按事件LongClick: 11。 | - | params | string | 是 | - | 事件参数,无参数传空字符串 ""。 | +**参数:** + +| 参数 | 类型 | 必填 | 描述 | +| ------ | -------| ---- | -------------------------- | +| id | string | 是 | 要触发事件的组件的id。 | +| action | number | 是 | 要触发的事件类型,目前支持取值:
- 点击事件Click: 10
- 长按事件LongClick: 11。 | +| params | string | 是 | 事件参数,无参数传空字符串 ""。 | + +**返回值:** -- 返回值 - | 类型 | 描述 | - | -------- | -------- | - | boolean | 找不到指定id的组件时返回false,其余情况返回true。 | +| 类型 | 描述 | +| -------- | --------------------------| +| boolean | 找不到指定id的组件时返回false,其余情况返回true。 | ### sendTouchEvent9+ @@ -73,17 +73,17 @@ sendTouchEvent(event: TouchObject): boolean 发送触摸事件。 -- 参数 +**参数:** - | 参数 | 类型 | 必填 | 默认值 | 描述 | - | ----- | ----------- | ---- | ------ | ------------------------------------------------------------ | - | event | TouchObject | 是 | - | 触发触摸事件的位置,event参数见[TouchEvent](ts-universal-events-touch.md#touchevent对象说明)中TouchObject的介绍。 | +| 参数 | 类型 | 必填 | 描述 | +| ----- | ----------- | ---- | ------------------------------------------------------------ | +| event | TouchObject | 是 | 触发触摸事件的位置,event参数见[TouchEvent](ts-universal-events-touch.md#touchevent对象说明)中TouchObject的介绍。 | -- 返回值 +**返回值:** - | 类型 | 描述 | - | ------- | ------------------------------------------- | - | boolean | 事件发送失败时返回false,其余情况返回true。 | +| 类型 | 描述 | +| ------- | ---------------------------| +| boolean | 事件发送失败时返回false,其余情况返回true。 | ### sendKeyEvent9+ @@ -91,17 +91,17 @@ sendKeyEvent(event: KeyEvent): boolean 发送按键事件。 -- 参数 +**参数:** - | 参数 | 类型 | 必填 | 默认值 | 描述 | - | ----- | -------- | ---- | ------ | ------------------------------------------------------------ | - | event | KeyEvent | 是 | - | 按键事件,event参数见[KeyEvent](ts-universal-events-key.md#keyevent对象说明)介绍。 | +| 参数 | 类型 | 必填 | 描述 | +| ----- | -------- | ---- | ------------------------------------------------------------ | +| event | KeyEvent | 是 | 按键事件,event参数见[KeyEvent](ts-universal-events-key.md#keyevent对象说明)介绍。 | -- 返回值 +**返回值:** - | 类型 | 描述 | - | ------- | --------------------------------------------- | - | boolean | 事件发送失败时时返回false,其余情况返回true。 | +| 类型 | 描述 | +| ------- | ------------------------------| +| boolean | 事件发送失败时时返回false,其余情况返回true。 | ### sendMouseEvent9+ @@ -109,17 +109,17 @@ sendMouseEvent(event: MouseEvent): boolean 发送鼠标事件。 -- 参数 +**参数:** - | 参数 | 类型 | 必填 | 默认值 | 描述 | - | ----- | ---------- | ---- | ------ | ------------------------------------------------------------ | - | event | MouseEvent | 是 | - | 鼠标事件,event参数见[MouseEvent](ts-universal-mouse-key.md#mouseevent对象说明)介绍。 | +| 参数 | 类型 | 必填 | 描述 | +| ----- | ---------- | ---- | --------------------------------------- | +| event | MouseEvent | 是 | 鼠标事件,event参数见[MouseEvent](ts-universal-mouse-key.md#mouseevent对象说明)介绍。 | -- 返回值 +**返回值:** - | 类型 | 描述 | - | ------- | --------------------------------------------- | - | boolean | 事件发送失败时时返回false,其余情况返回true。 | +| 类型 | 描述 | +| ------- | ---------------------------------- | +| boolean | 事件发送失败时返回false,其余情况返回true。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-gradient-color.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-gradient-color.md index abc458e888..dffdc69213 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-gradient-color.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-gradient-color.md @@ -7,19 +7,14 @@ > 从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -## 权限列表 - -无 - - ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| -------- | -------- | -------- | -------- | -| linearGradient | {
angle?: number \| string,
direction?: [GradientDirection](ts-appendix-enums.md#gradientdirection),
colors: Array<[ColorStop](ts-basic-components-gauge.md#colorstop)>,
repeating?: boolean
} | - | 线性渐变。
angle: 线性渐变的角度。
direction: 线性渐变的方向,设置angle后不生效。
colors: 为渐变的颜色描述。
repeating: 为渐变的颜色重复着色。 | -| sweepGradient | {
center: Point,
start?: number \| string,
end?: number \| string,
rotation?: number\|string,
colors: Array<[ColorStop](ts-basic-components-gauge.md#colorstop)>,
repeating?: boolean
} | - | 角度渐变。
center:为角度渐变的中心点。
start:角度渐变的起点。
end:角度渐变的终点。
rotation: 角度渐变的旋转角度。
colors: 为渐变的颜色描述。
repeating: 为渐变的颜色重复着色。 | -| radialGradient | {
center: Point,
radius: number \| string,
colors: Array<[ColorStop](ts-basic-components-gauge.md#colorstop)>,
repeating?: boolean
} | - | 径向渐变。
center:径向渐变的中心点。
radius:径向渐变的半径。
colors: 为渐变的颜色描述。
repeating: 为渐变的颜色重复着色。 | +| 名称 | 参数类型 | 描述 | +| -------------- | -------------------------------------------- | ----------------------------------- | +| linearGradient | {
angle?: number \| string,
direction?: [GradientDirection](ts-appendix-enums.md#gradientdirection),
colors: Array<[ColorStop](ts-basic-components-gauge.md#colorstop)>,
repeating?: boolean
} | 线性渐变。
- angle: 线性渐变的角度。
- direction: 线性渐变的方向,设置angle后不生效。
- colors: 为渐变的颜色描述。
- repeating: 为渐变的颜色重复着色。 | +| sweepGradient | {
center: Point,
start?: number \| string,
end?: number \| string,
rotation?: number\|string,
colors: Array<[ColorStop](ts-basic-components-gauge.md#colorstop)>,
repeating?: boolean
} | 角度渐变。
- center:为角度渐变的中心点。
- start:角度渐变的起点。
- end:角度渐变的终点。
- rotation: 角度渐变的旋转角度。
- colors: 为渐变的颜色描述。
- repeating: 为渐变的颜色重复着色。 | +| radialGradient | {
center: Point,
-radius: number \| string,
colors: Array<[ColorStop](ts-basic-components-gauge.md#colorstop)>,
repeating?: boolean
} | 径向渐变。
- center:径向渐变的中心点。
- radius:径向渐变的半径。
- colors: 为渐变的颜色描述。
- repeating: 为渐变的颜色重复着色。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-grid.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-grid.md index 6851a7f2ee..24282f95e4 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-grid.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-grid.md @@ -6,19 +6,14 @@ > - 栅格布局的列宽、列间距由距离最近的GridContainer父组件决定。使用栅格属性的组件树上至少需要有1个GridContainer容器组件。 -## 权限列表 - -无 - - ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| -------- | -------- | -------- | -------- | -| useSizeType | {
xs?: number \| { span: number, offset: number },
sm?: number \| { span: number, offset: number },
md?: number \| { span: number, offset: number },
lg?: number \| { span: number, offset: number }
} | - | 设置在特定设备宽度类型下的占用列数和偏移列数,span: 占用列数; offset: 偏移列数。
当值为number类型时,仅设置列数, 当格式如{"span": 1, "offset": 0}时,指同时设置占用列数与偏移列数。
- xs: 指设备宽度类型为SizeType.XS时的占用列数和偏移列数。
- sm: 指设备宽度类型为SizeType.SM时的占用列数和偏移列数。
- md: 指设备宽度类型为SizeType.MD时的占用列数和偏移列数。
- lg: 指设备宽度类型为SizeType.LG时的占用列数和偏移列数。 | -| gridSpan | number | 1 | 默认占用列数,指useSizeType属性没有设置对应尺寸的列数(span)时,占用的栅格列数。
>  **说明:**
> 设置了栅格span属性,组件的宽度由栅格布局决定。 | -| gridOffset | number | 0 | 默认偏移列数,指useSizeType属性没有设置对应尺寸的偏移(offset)时, 当前组件沿着父组件Start方向,偏移的列数,也就是当前组件位于第n列。
>  **说明:**
> -配置该属性后,当前组件在父组件水平方向的布局不再跟随父组件原有的布局方式,而是沿着父组件的Start方向偏移一定位移。
> -偏移位移 = (列宽 + 间距)\* 列数。
> -设置了偏移(gridOffset)的组件之后的兄弟组件会根据该组件进行相对布局,类似相对布局。 | +| 名称 | 参数类型 | 描述 | +| ----------- | --------------------------| ----------------------------------------------- | +| useSizeType | {
xs?: number \| { span: number, offset: number },
sm?: number \| { span: number, offset: number },
md?: number \| { span: number, offset: number },
lg?: number \| { span: number, offset: number }
} | 设置在特定设备宽度类型下的占用列数和偏移列数,span: 占用列数; offset: 偏移列数。
当值为number类型时,仅设置列数, 当格式如{"span": 1, "offset": 0}时,指同时设置占用列数与偏移列数。
- xs: 指设备宽度类型为SizeType.XS时的占用列数和偏移列数。
- sm: 指设备宽度类型为SizeType.SM时的占用列数和偏移列数。
- md: 指设备宽度类型为SizeType.MD时的占用列数和偏移列数。
- lg: 指设备宽度类型为SizeType.LG时的占用列数和偏移列数。 | +| gridSpan | number | 默认占用列数,指useSizeType属性没有设置对应尺寸的列数(span)时,占用的栅格列数。
**说明:**
设置了栅格span属性,组件的宽度由栅格布局决定。
默认值:1 | +| gridOffset | number | 默认偏移列数,指useSizeType属性没有设置对应尺寸的偏移(offset)时, 当前组件沿着父组件Start方向,偏移的列数,也就是当前组件位于第n列。
**说明:**
-配置该属性后,当前组件在父组件水平方向的布局不再跟随父组件原有的布局方式,而是沿着父组件的Start方向偏移一定位移。
-偏移位移 = (列宽 + 间距)\* 列数。
-设置了偏移(gridOffset)的组件之后的兄弟组件会根据该组件进行相对布局,类似相对布局。
默认值:0 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-hit-test-behavior.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-hit-test-behavior.md index 28ef7ac096..2dd7f78566 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-hit-test-behavior.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-hit-test-behavior.md @@ -4,28 +4,23 @@ > **说明:** > - 从API Version 9开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -> - 当Stack组件中有多个节点触摸区域重叠时,如两个节点,默认只会对显示在最上层的节点做触摸测试,若需要显示在下层的节点触发触摸测试,请给显示在上层的节点设置hitTestBehavior为HitTestMode.Transparent。 - - -## 权限列表 - -无 +> - 当Stack组件中有多个节点触摸区域重叠时,如两个节点,默认只会对显示在最上层的节点做触摸测试,若需要显示在下层的节点触发触摸测试,请给显示在上层的节点设置hitTestBehavior为HitTestMode.Transparent。 ## 属性 -| **名称** | **参数类型** | **默认值** | **描述** | -| -------------------- | -------- | ------- | ---------------------------------------- | -| hitTestBehavior | HitTestMode | HitTestMode.Default | 设置当前组件的触摸测试类型。 | +| **名称** | **参数类型** | **描述** | +| -------------------- | -------- | ---------------------------------------- | +| hitTestBehavior | HitTestMode | 设置当前组件的触摸测试类型。
默认值: HitTestMode.Default | -- HitTestMode 枚举说明 +## HitTestMode 枚举说明 - | 名称 | 描述 | - | -------- | -------- | - | Default | 默认触摸测试效果,自身和子节点都响应触摸测试,但会阻塞兄弟节点的触摸测试。 | - | Block | 自身响应触摸测试,阻塞子节点和兄弟节点的触摸测试。 | + | 名称 | 描述 | + | ------------| ----------------------------------------- | + | Default | 默认触摸测试效果,自身和子节点都响应触摸测试,但会阻塞兄弟节点的触摸测试。 | + | Block | 自身响应触摸测试,阻塞子节点和兄弟节点的触摸测试。 | | Transparent | 自身和子节点都响应触摸测试,不会阻塞兄弟节点的触摸测试。 | - | None | 自身不响应触摸测试,不会阻塞子节点和兄弟节点的触摸测试。 | + | None | 自身不响应触摸测试,不会阻塞子节点和兄弟节点的触摸测试。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-hover-effect.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-hover-effect.md index e9c817aa0d..01dada4545 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-hover-effect.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-hover-effect.md @@ -3,19 +3,15 @@ 设置组件的鼠标悬浮态显示效果。 > **说明:** +> > 从API Version 8开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -## 权限列表 - -无 - - ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| -------- | -------- | -------- | -------- | -| hoverEffect | [HoverEffect](ts-appendix-enums.md#hovereffect8) | HoverEffect.Auto | 设置当前组件悬停态下的悬浮效果。 | +| 名称 | 参数类型 | 描述 | +| ----------- | --------------------------------------------------| ------------------------------------------------ | +| hoverEffect | [HoverEffect](ts-appendix-enums.md#hovereffect8) | 设置当前组件悬停态下的悬浮效果。
默认值:HoverEffect.Auto | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-menu.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-menu.md index 1b46ee5137..543af9320c 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-menu.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-menu.md @@ -10,10 +10,10 @@ ## 属性 -| 名称 | 参数类型 | 描述 | +| 名称 | 参数类型 | 描述 | | ---------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| bindMenu | Array8+ | content: [CustomBuilder](ts-types.md),
responseType: [ResponseType](ts-appendix-enums.md#responsetype8) | 给组件绑定菜单,触发方式为长按或者右键点击,弹出菜单项需要自定义。 | +| bindMenu | Array8+ | content: [CustomBuilder](ts-types.md#custombuilder8),
responseType: [ResponseType](ts-appendix-enums.md#responsetype8) | 给组件绑定菜单,触发方式为长按或者右键点击,弹出菜单项需要自定义。 | ## MenuItem diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-overlay.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-overlay.md index 46c242c454..4a84e85fa5 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-overlay.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-overlay.md @@ -3,20 +3,14 @@ 设置组件的遮罩文本。 > **说明:** +> > 从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 - -## 权限列表 - -无 - - ## 属性 - -| 名称 | 参数类型 | 默认值 | 描述 | -| -------- | -------- | -------- | -------- | -| overlay | value: string,
options?: {
align?: [Alignment](ts-appendix-enums.md#alignment), 
offset?: {x?: number, y?: number}
} | {
align: Alignment.Center,
offset: {0, 0}
} | 在当前组件上,增加遮罩文本,布局与当前组件相同。 | +| 名称 | 参数类型 | 描述 | +| ------- | ----------------------------- | ------------------------- | +| overlay | value: string,
options?: {
align?: [Alignment](ts-appendix-enums.md#alignment), 
offset?: {
x?: number,
y?: number
}
} | 在当前组件上,增加遮罩文本,布局与当前组件相同。
默认值:
{
align: Alignment.Center,
offset: {0, 0}
} | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md index bb707e9be1..620c17f0f2 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md @@ -10,33 +10,33 @@ ## 接口 -| 名称 | 参数类型 | 描述 | -| -------- | -------- | -------- | -| bindPopup | show: boolean,
popup: PopupOptions \| CustomPopupOptions8+ | 给组件绑定Popup,点击弹出弹窗。
show: 创建页面弹窗提示是否默认显示,默认值为false。
popup: 配置当前弹窗提示的参数。 | +| 名称 | 参数类型 | 描述 | +| ---------- | ------------------------------------- | --------------------------------------- | +| bindPopup | show: boolean,
popup: PopupOptions \| CustomPopupOptions8+ | 给组件绑定Popup,点击弹出弹窗。
show: 创建页面弹窗提示是否默认显示,默认值为false。
popup: 配置当前弹窗提示的参数。 | ## PopupOptions类型说明 -| 名称 | 类型 | 必填 | 描述 | -| -------- | -------- | -------- | -------- | -| message | string | 是 | 弹窗信息内容。 | -| placementOnTop | boolean | 否 | 是否在组件上方显示,默认值为false。 | -| arrowOffset9+ | [Length](ts-types.md#length) | 否 | popup箭头在弹窗处的偏移。箭头在气泡上下方时,默认居左;箭头在气泡左右侧时,默认居上。 | -| primaryButton | {
value: string,
action: () => void
} | 否 | 第一个按钮。
value: 弹窗里主按钮的文本。
action: 点击主按钮的回调函数。 | -| secondaryButton | {
value: string,
action: () => void
} | 否 | 第二个按钮。
value: 弹窗里辅助按钮的文本。
action: 点击辅助按钮的回调函数。 | -| onStateChange | (event: { isVisible: boolean }) => void | 否 | 弹窗状态变化事件回调,参数isVisible为弹窗当前的显示状态。 | +| 名称 | 类型 | 必填 | 描述 | +| -------------------------| ------------------------------------------------| -----| ----------------------------------------- | +| message | string | 是 | 弹窗信息内容。 | +| placementOnTop | boolean | 否 | 是否在组件上方显示,默认值为false。 | +| arrowOffset9+ | [Length](ts-types.md#length) | 否 | popup箭头在弹窗处的偏移。箭头在气泡上下方时,默认居左;箭头在气泡左右侧时,默认居上。 | +| primaryButton | {
value: string,
action: () => void
} | 否 | 第一个按钮。
- value: 弹窗里主按钮的文本。
- action: 点击主按钮的回调函数。 | +| secondaryButton | {
value: string,
action: () => void
} | 否 | 第二个按钮。
- value: 弹窗里辅助按钮的文本。
- action: 点击辅助按钮的回调函数。 | +| onStateChange | (event: { isVisible: boolean }) => void | 否 | 弹窗状态变化事件回调,参数isVisible为弹窗当前的显示状态。 | ## CustomPopupOptions8+类型说明 -| 名称 | 类型 | 必填 | 描述 | -| -------- | -------- | -------- | -------- | -| builder | [CustomBuilder](ts-types.md) | 是 | 提示气泡内容的构造器。 | -| placement | [Placement](ts-appendix-enums.md#placement8) | 否 | 气泡组件优先显示的位置,当前位置显示不下时,会自动调整位置。
默认值:Placement.Bottom | -| arrowOffset9+ | [Length](ts-types.md#length) | 否 | popup箭头在弹窗处的偏移。箭头在气泡上下方时,默认居左;箭头在气泡左右侧时,默认居上。 | -| maskColor | [ResourceColor](ts-types.md) | 否 | 提示气泡遮障层的颜色。 | -| popupColor | [ResourceColor](ts-types.md) | 否 | 提示气泡的颜色。 | -| enableArrow | boolean | 否 | 是否显示箭头。
从API Version 9开始,如果箭头所在方位侧的气泡长度不足以显示下箭头,则会默认不显示箭头。比如:placement设置为Left,但气泡高度小于箭头的宽度(32vp),则实际不会显示箭头。
默认值:true | -| autoCancel | boolean | 否 | 页面有操作时,是否自动关闭气泡
默认值:true | -| onStateChange | (event: { isVisible: boolean }) => void | 否 | 弹窗状态变化事件回调,参数为弹窗当前的显示状态。 | +| 名称 | 类型 | 必填 | 描述 | +| -------------------------| ------------------------- | ---- | ---------------------------------------------------- | +| builder | [CustomBuilder](ts-types.md#custombuilder8) | 是 | 提示气泡内容的构造器。 | +| placement | [Placement](ts-appendix-enums.md#placement8) | 否 | 气泡组件优先显示的位置,当前位置显示不下时,会自动调整位置。
默认值:Placement.Bottom | +| arrowOffset9+ | [Length](ts-types.md#length) | 否 | popup箭头在弹窗处的偏移。箭头在气泡上下方时,默认居左;箭头在气泡左右侧时,默认居上。 | +| maskColor | [ResourceColor](ts-types.md#resourcecolor8) | 否 | 提示气泡遮障层的颜色。 | +| popupColor | [ResourceColor](ts-types.md#resourcecolor8) | 否 | 提示气泡的颜色。 | +| enableArrow | boolean | 否 | 是否显示箭头。
从API Version 9开始,如果箭头所在方位侧的气泡长度不足以显示下箭头,则会默认不显示箭头。比如:placement设置为Left,但气泡高度小于箭头的宽度(32vp),则实际不会显示箭头。
默认值:true | +| autoCancel | boolean | 否 | 页面有操作时,是否自动关闭气泡
默认值:true | +| onStateChange | (event: { isVisible: boolean }) => void | 否 | 弹窗状态变化事件回调,参数为弹窗当前的显示状态。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sharp-clipping.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sharp-clipping.md index a6dc299321..a1deb4d275 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sharp-clipping.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sharp-clipping.md @@ -7,18 +7,13 @@ > 从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -## 权限列表 - -无 - - ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| -------- | -------- | -------- | -------- | -| clip | [Circle](ts-drawing-components-circle.md) \| [Ellipse](ts-drawing-components-ellipse.md) \| [Path](ts-drawing-components-path.md) \| [Rect](ts-drawing-components-rect.md) \| boolean | false | 参数为相应类型的组件,按指定的形状对当前组件进行裁剪;参数为boolean类型时,设置是否按照边缘轮廓进行裁剪。 | -| mask | [Circle](ts-drawing-components-circle.md) \| [Ellipse](ts-drawing-components-ellipse.md) \| [Path](ts-drawing-components-path.md) \| [Rect](ts-drawing-components-rect.md) | - | 在当前组件上加上指定形状的遮罩。 | +| 名称 | 参数类型 | 描述 | +| -----| ------------------------------------------ | ------------------------------------ | +| clip | [Circle](ts-drawing-components-circle.md) \| [Ellipse](ts-drawing-components-ellipse.md) \| [Path](ts-drawing-components-path.md) \| [Rect](ts-drawing-components-rect.md) \| boolean | 参数为相应类型的组件,按指定的形状对当前组件进行裁剪;参数为boolean类型时,设置是否按照边缘轮廓进行裁剪。
默认值:false | +| mask | [Circle](ts-drawing-components-circle.md) \| [Ellipse](ts-drawing-components-ellipse.md) \| [Path](ts-drawing-components-path.md) \| [Rect](ts-drawing-components-rect.md) | 在当前组件上加上指定形状的遮罩。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-text-style.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-text-style.md index 94a531a62f..d8e9f2df3c 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-text-style.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-text-style.md @@ -7,22 +7,16 @@ 针对包含文本元素的组件,设置文本样式。 - -## 权限列表 - -无 - - ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| -------- | -------- | -------- | -------- | -| fontColor | [ResourceColor](ts-types.md) | - | 设置文本颜色。 | -| fontSize | Length \| [Resource](ts-types.md#resource类型) | - | 设置文本尺寸,Length为number类型时,使用fp单位。 | -| fontStyle | [FontStyle](ts-appendix-enums.md#fontstyle) | FontStyle.Normal | 设置文本的字体样式。 | -| fontWeight | number \| [FontWeight](ts-appendix-enums.md#fontweight) \| string | FontWeight.FontWeightNormal | 设置文本的字体粗细,number类型取值[100, 900],取值间隔为100,默认为400,取值越大,字体越粗。
提供常用枚举值,参考:FontWeight枚举说明。 | -| fontFamily | string \| [Resource](ts-types.md#resource类型) | - | 设置文本的字体列表。使用多个字体,使用','进行分割,优先级按顺序生效。例如:'Arial, sans-serif'。 | +| 名称 | 参数类型 | 描述 | +| -----------| ---------------------------------------- | ------------------------------------ | +| fontColor | [ResourceColor](ts-types.md#resourcecolor8) | 设置文本颜色。 | +| fontSize | Length \| [Resource](ts-types.md#resource) | 设置文本尺寸,Length为number类型时,使用fp单位。 | +| fontStyle | [FontStyle](ts-appendix-enums.md#fontstyle) | 设置文本的字体样式。
默认值:FontStyle.Normal | +| fontWeight | number \| [FontWeight](ts-appendix-enums.md#fontweight) \| string | 设置文本的字体粗细,number类型取值[100, 900],取值间隔为100,默认为400,取值越大,字体越粗。
默认值:FontWeight.FontWeightNormal | +| fontFamily | string \| [Resource](ts-types.md#resource) | 设置文本的字体列表。使用多个字体,使用','进行分割,优先级按顺序生效。例如:'Arial, sans-serif'。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-touch-target.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-touch-target.md index c812196014..fdf7314b0c 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-touch-target.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-touch-target.md @@ -10,18 +10,18 @@ ## 属性 -| 名称 | 参数类型 | 描述 | -| -------- | -------- | -------- | +| 名称 | 参数类型 | 描述 | +| -------------- | --------------------------------------------- | ----------------------------------------- | | responseRegion | Array<Rectangle> \| Rectangle | 设置一个或多个触摸热区,包括位置和大小。
默认值:
{
x:0,
y:0,
width:'100%',
height:'100%'
} | ### Rectangle对象说明 -| 名称 | 类型 | 必填 | 描述 | -| -------- | -------- | -------- | -------- | -| x | [Length](ts-types.md) | 否 | 触摸点相对于组件本身左边沿的X坐标。
默认值:0vp | -| y | [Length](ts-types.md) | 否 | 触摸点相对于组件本身左边沿的Y坐标。
默认值:0vp | -| width | [Length](ts-types.md) | 否 | 触摸热区范围的宽度。
默认值:100% | -| height | [Length](ts-types.md) | 否 | 触摸热区范围的高度。
默认值:100% | +| 名称 | 类型 | 必填 | 描述 | +| ------ | ----------------------------- | -----| -------------------------------- | +| x | [Length](ts-types.md#length) | 否 | 触摸点相对于组件本身左边沿的X坐标。
默认值:0vp | +| y | [Length](ts-types.md#length) | 否 | 触摸点相对于组件本身左边沿的Y坐标。
默认值:0vp | +| width | [Length](ts-types.md#length) | 否 | 触摸热区范围的宽度。
默认值:100% | +| height | [Length](ts-types.md#length) | 否 | 触摸热区范围的高度。
默认值:100% | > **说明:** > diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-transformation.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-transformation.md index 2b1425746c..e15d25b361 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-transformation.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-transformation.md @@ -3,23 +3,18 @@ 用于对组件进行旋转、平移、缩放、矩阵变换等操作。 > **说明:** +> > 从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 - -## 权限列表 - -无 - - ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| --------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| rotate | {
x?: number,
y?: number,
z?: number,
angle?: Angle,
centerX?: number \| string,
centerY?: number \| string
} | {
x: 0,
y: 0,
z: 0,
angle: 0,
centerX: '50%',
centerY: '50%'
} | (x, y, z)指定一个矢量,表示旋转轴,正角度为顺时针转动,负角度为逆时针转动,默认值为0,同时可以通过centerX和centerY设置旋转的中心点。 | -| translate | {
x?: number \| string,
y?: number \| string,
z? : number \| string
} | {
x: 0,
y: 0,
z: 0
} | 可以分别设置X轴、Y轴、Z轴的平移距离,距离的正负控制平移的方向,默认值为0。不支持百分比形式的输入。| -| scale | {
x?: number,
y?: number,
z?: number,
centerX?: number \| string,
centerY?: number \| string
} | {
x: 1,
y: 1,
z: 1,
centerX:'50%',
centerY:'50%'
} | 可以分别设置X轴、Y轴、Z轴的缩放比例,默认值为1,同时可以通过centerX和centerY设置缩放的中心点。 | -| transform | Matrix4Transit | - | 设置当前组件的变换矩阵。 | +| 名称 | 参数类型 | 描述 | +| --------- | ------------------------------------------------------------------------ | ---------------------------------------- | +| rotate | {
x?: number,
y?: number,
z?: number,
angle?: Angle,
centerX?: number \| string,
centerY?: number \| string
} | (x, y, z)指定一个矢量,表示旋转轴,正角度为顺时针转动,负角度为逆时针转动,默认值为0,同时可以通过centerX和centerY设置旋转的中心点。
默认值:
{
x: 0,
y: 0,
z: 0,
angle: 0,
centerX: '50%',
centerY: '50%'
} | +| translate | {
x?: number \| string,
y?: number \| string,
z? : number \| string
} | 可以分别设置X轴、Y轴、Z轴的平移距离,距离的正负控制平移的方向,默认值为0。不支持百分比形式的输入。
默认值:
{
x: 0,
y: 0,
z: 0
}| +| scale | {
x?: number,
y?: number,
z?: number,
centerX?: number \| string,
centerY?: number \| string
} | 可以分别设置X轴、Y轴、Z轴的缩放比例,默认值为1,同时可以通过centerX和centerY设置缩放的中心点。
默认值:
{
x: 1,
y: 1,
z: 1,
centerX:'50%',
centerY:'50%'
} | +| transform | Matrix4Transit | 设置当前组件的变换矩阵。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-visibility.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-visibility.md index b0abcabf9e..3a39521947 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-visibility.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-visibility.md @@ -3,20 +3,14 @@ 控制组件是否可见。 > **说明:** +> > 从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 - -## 权限列表 - -无 - - ## 属性 - -| 名称 | 参数类型 | 默认值 | 描述 | -| -------- | -------- | -------- | -------- | -| visibility | [Visibility](ts-appendix-enums.md#visibility) | Visibility.Visible | 控制当前组件显示或隐藏。注意,即使组件处于隐藏状态,在页面刷新时仍存在重新创建过程,因此当对性能有严格要求时建议使用[条件渲染](../../ui/ts-rending-control-syntax-if-else.md)代替。| +| 名称 | 参数类型 | 描述 | +| ---------- | ---------------------------- | ------------------------------------------ | +| visibility | [Visibility](ts-appendix-enums.md#visibility) | 控制当前组件显示或隐藏。注意,即使组件处于隐藏状态,在页面刷新时仍存在重新创建过程,因此当对性能有严格要求时建议使用[条件渲染](../../ui/ts-rending-control-syntax-if-else.md)代替。
默认值:Visibility.Visible| ## 示例 -- GitLab