📄 useClipboardItems¶
📊 Analysis Summary¶
| Metric | Count |
|---|---|
| 🔧 Functions | 3 |
| 📦 Imports | 12 |
| ⚡ Async/Await Patterns | 2 |
| 📐 Interfaces | 2 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 packages/core/useClipboardItems/index.ts
📦 Imports¶
| Name | Source |
|---|---|
MaybeRefOrGetter |
vue |
Ref |
vue |
ShallowRef |
vue |
ConfigurableNavigator |
../_configurable |
Supportable |
../types |
useTimeoutFn |
@vueuse/shared |
shallowReadonly |
vue |
shallowRef |
vue |
toValue |
vue |
defaultNavigator |
../_configurable |
useEventListener |
../useEventListener |
useSupported |
../useSupported |
Async/Await Patterns¶
| Type | Function | Await Expressions | Promise Chains |
|---|---|---|---|
| promise-chain | updateContent |
none | navigator!.clipboard.read().then |
| async-function | copy |
navigator!.clipboard.write(value) | none |
Functions¶
useClipboardItems(options: UseClipboardItemsOptions<undefined>): UseClipboardItemsReturn<false>¶
Reactive Clipboard API.
Parameters:
optionsany: No description
See: https://vueuse.org/useClipboardItems
Tags: @__NO_SIDE_EFFECTS__
Raw JSDoc
Code
Internal helpers¶
Declared inside another function in this file.
updateContent(): void¶
Returns: void
Calls:
navigator!.clipboard.read().then
Code
copy(value: any): Promise<void>¶
Parameters:
valueany
Returns: Promise<void>
Calls:
navigator!.clipboard.writetimeout.start
Code
Interfaces¶
UseClipboardItemsOptions<Source>¶
Interface Code
Properties¶
| Name | Type | Optional | Description |
|---|---|---|---|
read |
boolean |
✓ | not shown |
source |
Source |
✓ | not shown |
copiedDuring |
number |
✓ | not shown |
UseClipboardItemsReturn<Optional>¶
Interface Code
Properties¶
| Name | Type | Optional | Description |
|---|---|---|---|
content |
Readonly<Ref<ClipboardItems>> |
✗ | not shown |
copied |
Readonly<ShallowRef<boolean>> |
✗ | not shown |
copy |
Optional extends true ? (content?: ClipboardItems) => Promise<void> : (text: ... |
✗ | not shown |
read |
() => void |
✗ | not shown |
Generated by Syntax Scribe