From 42e1d64bb9a0ac33e483ed2836fa4f1188572f16 Mon Sep 17 00:00:00 2001 From: kukixi Date: Mon, 14 Mar 2022 17:15:27 +0800 Subject: [PATCH 1/4] add before APIS Signed-off-by: kukixi --- api/common/@internal/global.d.ts | 27 +++++++++++++++++++++++++++ api/form/hml/basic/chart.json | 17 +++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/api/common/@internal/global.d.ts b/api/common/@internal/global.d.ts index 23fe8c0eb5..80e9934f68 100644 --- a/api/common/@internal/global.d.ts +++ b/api/common/@internal/global.d.ts @@ -35,6 +35,33 @@ export declare function setInterval(handler: Function | string, delay: number, . */ export declare function setTimeout(handler: Function | string, delay?: number, ...arguments: any[]): number; +/** + * Sets a timer after which a function will be executed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param handler Indicates the function to be called after the timer goes off. For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. For devices of "lite wearable" and "smartVision" types, this parameter must be a function. + * @param delay Indicates the delay (in milliseconds) after which the function will be called. If this parameter is left empty, default value "0" will be used, which means that the function will be called immediately or as soon as possible. + * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off. + * @returns Returns the timer ID. + * @since 3 + */ +export declare function setTimeout(handler: Function | string, delay?: number, ...arguments: any[]): number; + +/** + * Sets a vsync after which a function will be executed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @param handler Indicates the function to be called when the vsync trigger. + * @since 3 + */ +export declare function requestAnimationFrame(handler: Function): number; + +/** + * Cancels the vsync callback set by "requestAnimationFrame()". + * @param requestId Indicates the vsync callback ID returned by "requestAnimationFrame()". + * @devices tv, phone, tablet, wearable + * @since 3 + */ +export declare function cancelAnimationFrame(requestId: number): void; + /** * Cancels the interval set by " setInterval()". * @syscap SystemCapability.ArkUI.ArkUI.Lite diff --git a/api/form/hml/basic/chart.json b/api/form/hml/basic/chart.json index 3e319f6bd2..7c8216352f 100644 --- a/api/form/hml/basic/chart.json +++ b/api/form/hml/basic/chart.json @@ -101,6 +101,23 @@ } ] }, + { + "name": "animationduration", + "supportedDevices": ["phone", "tablet"], + "version": [ + { + "name": "v6.0" + } + ], + "required": false, + "description": [ + { + "name": "Sets the animation duration of the proportion-type circular chart, in ms.", + "supportedDevices": ["phone", "tablet"] + } + ], + "type": "string" + }, { "name": "percent", "supportedDevices": ["phone", "tablet", "wearable", "tv", "car"], -- Gitee From 3c5bf2b9c4ad2298b96594e106a49e6e38ae6206 Mon Sep 17 00:00:00 2001 From: kukixi Date: Mon, 14 Mar 2022 17:25:34 +0800 Subject: [PATCH 2/4] add component custom method Signed-off-by: kukixi --- api/@internal/component/ets/common.d.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index e74d918213..5a7ca53289 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -1783,6 +1783,24 @@ declare class CustomComponent { * @since 7 */ aboutToDisappear?(): void; + + /** + * onPageShow Method + * @since 7 + */ + onPageShow?(): void; + + /** + * onPageHide Method + * @since 7 + */ + onPageHide?(): void; + + /** + * onBackPress Method + * @since 7 + */ + onBackPress?(): void; } /** -- Gitee From 86002bed0517d755545abfcb85065c61560b1721 Mon Sep 17 00:00:00 2001 From: kukixi Date: Mon, 14 Mar 2022 17:28:41 +0800 Subject: [PATCH 3/4] remove repeat Api Signed-off-by: kukixi --- api/common/@internal/global.d.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/api/common/@internal/global.d.ts b/api/common/@internal/global.d.ts index 80e9934f68..4f6bbfa2da 100644 --- a/api/common/@internal/global.d.ts +++ b/api/common/@internal/global.d.ts @@ -35,17 +35,6 @@ export declare function setInterval(handler: Function | string, delay: number, . */ export declare function setTimeout(handler: Function | string, delay?: number, ...arguments: any[]): number; -/** - * Sets a timer after which a function will be executed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @param handler Indicates the function to be called after the timer goes off. For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. For devices of "lite wearable" and "smartVision" types, this parameter must be a function. - * @param delay Indicates the delay (in milliseconds) after which the function will be called. If this parameter is left empty, default value "0" will be used, which means that the function will be called immediately or as soon as possible. - * @param arguments Indicates additional arguments to pass to "handler" when the timer goes off. - * @returns Returns the timer ID. - * @since 3 - */ -export declare function setTimeout(handler: Function | string, delay?: number, ...arguments: any[]): number; - /** * Sets a vsync after which a function will be executed. * @syscap SystemCapability.ArkUI.ArkUI.Full -- Gitee From b8054dad68157a017c280e13c4a8597d55d36c5d Mon Sep 17 00:00:00 2001 From: kukixi Date: Mon, 14 Mar 2022 17:33:41 +0800 Subject: [PATCH 4/4] add syscap Signed-off-by: kukixi --- api/common/@internal/global.d.ts | 2 +- api/form/hml/basic/chart.json | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/api/common/@internal/global.d.ts b/api/common/@internal/global.d.ts index 4f6bbfa2da..208039014f 100644 --- a/api/common/@internal/global.d.ts +++ b/api/common/@internal/global.d.ts @@ -45,8 +45,8 @@ export declare function requestAnimationFrame(handler: Function): number; /** * Cancels the vsync callback set by "requestAnimationFrame()". + * @syscap SystemCapability.ArkUI.ArkUI.Full * @param requestId Indicates the vsync callback ID returned by "requestAnimationFrame()". - * @devices tv, phone, tablet, wearable * @since 3 */ export declare function cancelAnimationFrame(requestId: number): void; diff --git a/api/form/hml/basic/chart.json b/api/form/hml/basic/chart.json index 7c8216352f..d44b0e0962 100644 --- a/api/form/hml/basic/chart.json +++ b/api/form/hml/basic/chart.json @@ -103,7 +103,6 @@ }, { "name": "animationduration", - "supportedDevices": ["phone", "tablet"], "version": [ { "name": "v6.0" @@ -112,8 +111,7 @@ "required": false, "description": [ { - "name": "Sets the animation duration of the proportion-type circular chart, in ms.", - "supportedDevices": ["phone", "tablet"] + "name": "Sets the animation duration of the proportion-type circular chart, in ms." } ], "type": "string" -- Gitee