From aaf29de0a0b8c698229c330b7b97170c89a7845f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B0=B8=E5=87=AF?= Date: Wed, 2 Jul 2025 23:24:43 +0800 Subject: [PATCH] =?UTF-8?q?onVisibleAreaApproximateChange=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘永凯 --- .../application-dev/reference/apis-arkui/arkui-ts/ts-types.md | 2 +- .../reference/apis-arkui/arkui-ts/ts-uicommonevent.md | 4 +--- .../ts-universal-component-visible-area-change-event.md | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-types.md b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-types.md index a947e402df4..65e08288574 100644 --- a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-types.md +++ b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-types.md @@ -740,7 +740,7 @@ type HoverCallback = (isHover: boolean, event: HoverEvent) => void; | 参数名 | 类型 | 必填 | 说明 | | ------ | --------------------------------------------------- | ---- | ------------------------------------------------------------ | | ratios | Array<number> | 是 | 阈值数组。其中,每个阈值代表组件可见面积(即组件在屏幕显示区的面积,只计算父组件内的面积,超出父组件部分不会计算)与组件自身面积的比值。每个阈值的取值范围为[0.0, 1.0],如果开发者设置的阈值超出该范围,则会实际取值0.0或1.0。 | -| expectedUpdateInterval | number | 否 | 预期更新间隔,单位为ms。定义了开发者期望的更新间隔。默认值:1000。| +| expectedUpdateInterval | number | 否 | 定义了开发者期望的计算间隔,单位为ms。默认值:1000| ## VisibleAreaChangeCallback12+ diff --git a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-uicommonevent.md b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-uicommonevent.md index dea8bdb5de8..29d23d74464 100644 --- a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-uicommonevent.md +++ b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-uicommonevent.md @@ -187,8 +187,6 @@ setOnVisibleAreaApproximateChange(options: VisibleAreaEventOptions, event: Visib >**说明:** > -> 非实时回调,实际回调与预期间隔可能存在差别。 -> -> 两次可见区域回调的时间间隔不小于预期更新间隔。当开发者设置的预期间隔过小时,由系统负载决定实际回调间隔时间。 +> 此接口与[onVisibleAreaChange](./ts-universal-component-visible-area-change-event.md#onvisibleareachange)接口存在如下差异,onVisibleAreaChange在每一帧都会进行可见区域比例的计算,如果注册节点太多,系统功耗存在劣化。此接口降低了可见区域比例计算的频度,计算间隔由[VisibleAreaEventOptions](./ts-types.md#visibleareaeventoptions12)的expectedUpdateInterval参数决定。 > > 当前接口的可见区域回调阈值默认包含0。例如,开发者设置回调阈值为[0.5],实际生效的阈值为[0.0, 0.5]。 diff --git a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-universal-component-visible-area-change-event.md b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-universal-component-visible-area-change-event.md index 9872013bd0d..f7a634f0382 100644 --- a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-universal-component-visible-area-change-event.md +++ b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-universal-component-visible-area-change-event.md @@ -57,9 +57,7 @@ onVisibleAreaApproximateChange(options: VisibleAreaEventOptions, event: VisibleA >**说明:** > -> 非实时回调,实际回调与预期间隔可能存在差别。 -> -> 两次可见区域回调的时间间隔不小于预期更新间隔。当开发者设置的预期间隔过小时,由系统负载决定实际回调间隔时间。 +> 此接口与[onVisibleAreaChange](./ts-universal-component-visible-area-change-event.md#onvisibleareachange)接口存在如下差异,onVisibleAreaChange在每一帧都会进行可见区域比例的计算,如果注册节点太多,系统功耗存在劣化。此接口降低了可见区域比例计算的频度,计算间隔由[VisibleAreaEventOptions](./ts-types.md#visibleareaeventoptions12)的expectedUpdateInterval参数决定。 > > 当前接口的可见区域回调阈值默认包含0。例如,开发者设置回调阈值为[0.5],实际生效的阈值为[0.0, 0.5]。 -- Gitee