Skip to content

Directives ​

APIRegistered nameBehavior
vCopyv-copyCopies bound text or numbers when clicked
vDebouncev-debounceDebounces rapid consecutive clicks
vDraggablev-draggableDrags the target within its parent's bounds
vIconCopyv-icon-copyInserts a copy icon beside the target
vLongpressv-longpressInvokes a callback after a long press
vThrottlev-throttleThrottles repeated click callbacks

These directives require a browser DOM. Applications validate callback and clipboard content themselves.

In 2.0.22, copying uses browser capabilities only: it prefers the Clipboard API in a secure context and falls back to document.execCommand("copy") when unavailable. It no longer attempts uni-app's setClipboardData. Errors from internal utilities and Vue helpers use English; error types and triggering conditions remain unchanged.