openharmony 鸿蒙 ts-universal-events-drag-drop-sys

2026-08-25 浏览 (1)

Drag Event (System API)

A drag event refers to a sequence of events triggered in the UI when a user drags an object (such as a file, component, or element). These events allow you to customize drag and drop behaviors, enabling functionalities like drag and drop operations and position adjustments.

NOTE

The initial APIs of this module are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.

The resource files preset in the application (that is, the resource files that are contained in the HAP file before the application is installed) can be dragged and dropped only within the application.

This topic describes only the system APIs provided by the module. For details about its public APIs, see Drag Event.

DragEvent7+

Provides information about the drag event.

enableInternalDropAnimation20+

enableInternalDropAnimation(configuration: string): void

Sets whether to enable the system's built-in drop animation effect. This API is available only to system applications and can only be used during the onDrop phase.

System API: This is a system API.

System capability: SystemCapability.ArkUI.ArkUI.Full

Parameters

NameTypeMandatoryDescription
configurationstringYesAnimation configuration parameters in JSON format.

Error codes

For details about the error codes, see Universal Error Codes and Drag Event Error Codes.

IDError Message
202Permission verification failed, application which is not a system application uses system API.
801Capability not supported.
190003Operation not allowed for current phase.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 ts-drawing-components-shape

openharmony 鸿蒙 ts-universal-attributes-sharp-clipping

openharmony 鸿蒙 ts-universal-attributes-toolbar

openharmony 鸿蒙 ts-container-lazyvgridlayout

openharmony 鸿蒙 ohos-arkui-advanced-FoldSplitContainer

openharmony 鸿蒙 ts-methods-calendarpicker-dialog

openharmony 鸿蒙 ts-uicommonevent

openharmony 鸿蒙 ts-basic-gestures-tapgesture

openharmony 鸿蒙 ohos-arkui-advanced-DialogV2

openharmony 鸿蒙 ts-components-canvas-canvas

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/wLQiTPtj