diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 1925e406f82f8342a0a88f5de397e7aa79df1bdb..149f6b15ed4908ef062ac90f0c49a74050e1478e 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -250,6 +250,30 @@ interface ItemDragInfo { y: number; } +/** + * DragItemInfo object description + * @since 8 + */ +interface DragItemInfo { + /** + * Uses the pixelMap object for drawing. + * @since 8 + */ + pixelMap?: PixelMap; + + /** + * Uses the custom builder for drawing, if pixelMap is set, this value is ignored. + * @since 8 + */ + builder?: CustomBuilder; + + /** + * Sets the extra info for drag event. + * @since 8 + */ + extraInfo?: string; +} + /** * Defining syscap function. * @since 8 @@ -1262,32 +1286,32 @@ declare class CommonMethod { /** * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. * (To be triggered, press and hold for 170 milliseconds (ms)) - * @since 7 + * @since 8 */ - onDragStart(event: (event?: DragEvent, extraParams?: string) => (() => any) | void): T; + onDragStart(event: (event?: DragEvent, extraParams?: string) => CustomBuilder | DragItemInfo): T; /** * After binding, a callback is triggered when the component is dragged to the range of the component. - * @since 7 + * @since 8 */ onDragEnter(event: (event?: DragEvent, extraParams?: string) => void): T; /** * After binding, a callback is triggered when the drag moves within the range of a placeable component. - * @since 7 + * @since 8 */ onDragMove(event: (event?: DragEvent, extraParams?: string) => void): T; /** * After binding, a callback is triggered when the component is dragged out of the component range. - * @since 7 + * @since 8 */ onDragLeave(event: (event?: DragEvent, extraParams?: string) => void): T; /** * The component bound to this event can be used as the drag release target. * This callback is triggered when the drag behavior is stopped within the scope of the component. - * @since 7 + * @since 8 */ onDrop(event: (event?: DragEvent, extraParams?: string) => void): T;