From aedd670be381793a1afb9588eaabd6e22011526a Mon Sep 17 00:00:00 2001 From: xuzhidan Date: Tue, 15 Feb 2022 10:52:50 +0800 Subject: [PATCH 1/2] xuzhidan1@huawei.com Signed-off-by: xuzhidan Change-Id: If344cf20400d769980a6751b643b7f45b92f46c0 --- api/@internal/component/ets/common.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 77f868468c..725621348e 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -1258,7 +1258,7 @@ declare class CommonMethod { * (To be triggered, press and hold for 170 milliseconds (ms)) * @since 7 */ - onDragStart(event: (event?: DragEvent, extraParams?: string) => (() => any) | void): T; + onDragStart(value: {info: string, event: (event?: DragEvent, extraParams?: string) => (() => any)}): T; /** * After binding, a callback is triggered when the component is dragged to the range of the component. -- Gitee From 7dda2f3906078f68daef610813ef3172b44f8f5c Mon Sep 17 00:00:00 2001 From: xuzhidan Date: Tue, 15 Feb 2022 10:52:50 +0800 Subject: [PATCH 2/2] Add param support drag and drop windows. Signed-off-by: xuzhidan Change-Id: If344cf20400d769980a6751b643b7f45b92f46c0 --- api/@internal/component/ets/common.d.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 77f868468c..e1efb1ded9 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -121,6 +121,24 @@ declare const Extend: MethodDecorator & ((value: any) => MethodDecorator); */ declare const CustomDialog: ClassDecorator; +/** + * Defines the data type of the interface drag item. + * @since 8 + */ +declare interface DragItemInfo { + /** + * Set builder. + * @since 8 + */ + builder: (() => any); + + /** + * Set info. + * @since 8 + */ + info?: string; +} + /** * Defines the data type of the interface restriction. * @since 7 @@ -1258,7 +1276,7 @@ declare class CommonMethod { * (To be triggered, press and hold for 170 milliseconds (ms)) * @since 7 */ - onDragStart(event: (event?: DragEvent, extraParams?: string) => (() => any) | void): T; + onDragStart(event: (event?: DragEvent, extraParams?: string) => (() => any) | void | DragItemInfo): T; /** * After binding, a callback is triggered when the component is dragged to the range of the component. -- Gitee