Skip to content

Latest commit

 

History

History
45 lines (28 loc) · 903 Bytes

File metadata and controls

45 lines (28 loc) · 903 Bytes

Directives

The package exports a small set of reusable directives.

v-autofocus

Focuses the root element or the first matching focusable child.

<DsInput v-autofocus v-model="email" type="email" />

Use false to disable it or pass an options object with selector, preventScroll, and disabled.

v-autosize

Automatically resizes a textarea to its content.

<textarea v-autosize v-model="text" />

v-click-outside

Calls a handler when the user clicks outside the bound element.

<div v-click-outside="close">...</div>

v-hotkey

Maps hotkeys to handlers.

<div v-hotkey="{ Escape: close, 'Ctrl+K': openSearch }" />

v-loading

Mounts a loading overlay with DsLoading. The same feature is also available through createLoading().

<div v-loading="{ loading, text: loadingText, animated: true }">Content</div>