From 7d8ce0a69f7d2cc5ce3184afa4e7c9f8fb0b5564 Mon Sep 17 00:00:00 2001 From: gmy Date: Wed, 17 Aug 2022 15:56:09 +0800 Subject: [PATCH] update docs Signed-off-by: gmy --- .../arkui-js/js-components-custom-lifecycle.md | 8 ++++---- .../arkui-ts/ts-basic-gestures-pangesture.md | 10 +++++----- .../reference/arkui-ts/ts-container-list.md | 4 +++- .../reference/arkui-ts/ts-container-scroll.md | 3 ++- .../arkui-ts/ts-methods-custom-dialog-box.md | 2 +- .../arkui-ts/ts-transition-animation-component.md | 14 +++++++------- .../application-dev/ui/ui-ts-layout-mediaquery.md | 4 ++-- 7 files changed, 24 insertions(+), 21 deletions(-) diff --git a/zh-cn/application-dev/reference/arkui-js/js-components-custom-lifecycle.md b/zh-cn/application-dev/reference/arkui-js/js-components-custom-lifecycle.md index 959fa1d089..442c2108d5 100644 --- a/zh-cn/application-dev/reference/arkui-js/js-components-custom-lifecycle.md +++ b/zh-cn/application-dev/reference/arkui-js/js-components-custom-lifecycle.md @@ -14,8 +14,8 @@ | onLayoutReady | Function | 自定义组件布局完成 | 自定义组件插入Page组件树后,将会对自定义组件进行布局计算,调整其内容元素尺寸与位置,当布局计算结束后触发该回调。 | | onDetached | Function | 自定义组件摘除 | 自定义组件摘除时,触发该回调,常用于停止动画或异步逻辑停止执行的场景。 | | onDestroy | Function | 自定义组件销毁 | 自定义组件销毁时,触发该回调,常用于资源释放。 | -| onPageShow | Function | 自定义组件Page显示 | 自定义组件所在Page显示后,触发该回调。 | -| onPageHide | Function | 自定义组件Page隐藏 | 自定义组件所在Page隐藏后,触发该回调。 | +| onShow | Function | 自定义组件Page显示 | 自定义组件所在Page显示后,触发该回调。 | +| onHide | Function | 自定义组件Page隐藏 | 自定义组件所在Page隐藏后,触发该回调。 | ## 示例 @@ -42,10 +42,10 @@ export default { onDetached() { this.value = "" }, - onPageShow() { + onShow() { console.log("Page显示") }, - onPageHide() { + onHide() { console.log("Page隐藏") } } diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-gestures-pangesture.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-gestures-pangesture.md index 66f629bdd0..e68833ad70 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-gestures-pangesture.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-gestures-pangesture.md @@ -16,11 +16,11 @@ PanGesture(options?: { fingers?: number, direction?: PanDirection, distance?: nu **参数:** -| 参数名称 | 参数类型 | 必填 | 默认值 | 参数描述 | -| --------- | ------------ | ---- | ---- | ---------------------------------- | -| fingers | number | 否 | 1 | 触发滑动的最少手指数,最小为1指, 最大取值为10指。 | -| direction | PanDirection | 否 | All | 设置滑动方向,此枚举值支持逻辑与(&)和逻辑或(\|)运算。 | -| distance | number | 否 | 5.0 | 最小滑动识别距离,单位为vp。 | +| 参数名称 | 参数类型 | 必填 | 默认值 | 参数描述 | +| --------- | ------------ | ---- | ------ | ------------------------------------------------------------ | +| fingers | number | 否 | 1 | 触发滑动的最少手指数,最小为1指, 最大取值为10指。 | +| direction | PanDirection | 否 | All | 设置滑动方向,此枚举值支持逻辑与(&)和逻辑或(\|)运算。 | +| distance | number | 否 | 5.0 | 最小滑动识别距离,单位为vp。
**说明:**
> tab滑动与该拖动手势事件同时存在时,可将distance值设为1,使拖动更灵敏,避免造成事件错乱。 | ## PanDirection枚举说明 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-list.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-list.md index 2e2c5f33fe..031a072143 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-list.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-list.md @@ -4,7 +4,9 @@ > **说明:** > -> 该组件从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 +> - 该组件从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 +> +> - 该组件回弹的前提是要有滚动。内容小于一屏时,没有回弹效果。 ## 权限列表 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md index 37de4193c8..74e72f3b11 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md @@ -4,7 +4,8 @@ > **说明:** > -> 该组件从API version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 +> - 该组件从API version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 +> - 该组件回弹的前提是要有滚动。内容小于一屏时,没有回弹效果。 ## 权限列表 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md b/zh-cn/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md index b3f20a6fd3..b3e05efe18 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md @@ -4,7 +4,7 @@ > 从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 -通过CustomDialogController类显示自定义弹窗。 +通过CustomDialogController类显示自定义弹窗。使用弹窗组件时,可优先考虑自定义弹窗,便于自定义弹窗的样式与内容。 ## 接口 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-transition-animation-component.md b/zh-cn/application-dev/reference/arkui-ts/ts-transition-animation-component.md index 15650d2532..6dcdb52d16 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-transition-animation-component.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-transition-animation-component.md @@ -18,16 +18,16 @@ | -------- | -------- | -------- | -------- | -------- | | type | TransitionType | TransitionType.All | 否 | 默认包括组件新增和删除。
>  **说明:**
> 不指定Type时说明插入删除使用同一种效果。 | | opacity | number | 1 | 否 | 设置组件转场时的透明度效果,为插入时起点和删除时终点的值。 | - | translate | {
x? : number,
y? : number,
z? : number
} | - | 否 | 设置组件转场时的平移效果,为插入时起点和删除时终点的值。 | - | scale | {
x? : number,
y? : number,
z? : number,
centerX? : number,
centerY? : number
} | - | 否 | 设置组件转场时的缩放效果,为插入时起点和删除时终点的值。 | - | rotate | {
x?: number,
y?: number,
z?: number,
angle?: Angle,
centerX?: Length,
centerY?: Length
} | - | 否 | 设置组件转场时的旋转效果,为插入时起点和删除时终点的值。 | + | translate | {
x? : number,
y? : number,
z? : number
} | - | 否 | 设置组件转场时的平移效果,为插入时起点和删除时终点的值。
**说明:**
> x、y、z分别是横向、纵向、竖向的平移距离 | + | scale | {
x? : number,
y? : number,
z? : number,
centerX? : number,
centerY? : number
} | - | 否 | 设置组件转场时的缩放效果,为插入时起点和删除时终点的值。设置组件转场时的平移效果,为插入时起点和删除时终点的值。
**说明:**
\> x、y、z分别是横向、纵向、竖向放大倍数(或缩小到原来的多少)
> centerX、centerY缩放中心点
> 中心点为0时,默认的是组件的左上角
| + | rotate | {
x?: number,
y?: number,
z?: number,
angle?: Angle,
centerX?: Length,
centerY?: Length
} | - | 否 | 设置组件转场时的旋转效果,为插入时起点和删除时终点的值。
**说明:**
> x、y、z分别是横向、纵向、竖向的旋转向量
> centerX,centerY指旋转中心点
> 中心点为0时,默认的是组件的左上角 | - TransitionType枚举说明 - | 名称 | 描述 | + | 名称 | 描述 | | -------- | -------- | - | All | 指定当前的Transition动效生效在组件的所有变化场景。 | - | Insert | 指定当前的Transition动效生效在组件的插入场景。 | - | Delete | 指定当前的Transition动效生效在组件的删除场景。 | + | All | 指定当前的Transition动效生效在组件的所有变化场景。 | + | Insert | 指定当前的Transition动效生效在组件的插入场景。 | + | Delete | 指定当前的Transition动效生效在组件的删除场景。 | ## 示例 diff --git a/zh-cn/application-dev/ui/ui-ts-layout-mediaquery.md b/zh-cn/application-dev/ui/ui-ts-layout-mediaquery.md index 11a08f36e6..a3c6a88db4 100644 --- a/zh-cn/application-dev/ui/ui-ts-layout-mediaquery.md +++ b/zh-cn/application-dev/ui/ui-ts-layout-mediaquery.md @@ -43,9 +43,9 @@ listener.on('change', onPortrait) `(max-height: 800)` :当高度小于800时条件成立 -`(height <= 800) ` :当高度小于800时条件成立 +`(height <= 800) ` :当高度小于等于800时条件成立 -`screen and (device-type: tv) or (resolution < 2)` :包含多个媒体特征的多条件复杂语句查询 +`screen and (device-type: tv) or (resolution < 2)` :包含多个媒体特征的多条件复杂语句查询 ### 媒体类型(media-type) -- GitLab