v-clipboard
Advanced tools
Comparing version 3.0.0-next.0 to 3.0.0-next.1
@@ -7,3 +7,3 @@ { | ||
"license": "MIT", | ||
"version": "3.0.0-next.0", | ||
"version": "3.0.0-next.1", | ||
"type": "module", | ||
@@ -10,0 +10,0 @@ "scripts": { |
@@ -6,2 +6,6 @@ [![npm](https://img.shields.io/npm/v/v-clipboard)](https://img.shields.io/npm/v/v-clipboard) | ||
### Demo | ||
https://codesandbox.io/s/epic-waterfall-17yet5?file=/src/App.vue | ||
### Install | ||
@@ -26,4 +30,6 @@ | ||
> When an element that contains `v-clipboard` directive is clicked, the value of `value` will be copied into clipboard. | ||
When an element that contains `v-clipboard` directive is clicked, the value of `value` will be copied into clipboard. | ||
--- | ||
Copying **static** value (directive should receive actual value): | ||
@@ -37,2 +43,8 @@ | ||
```vue | ||
<button v-clipboard="'some text'"> | ||
Copy to clipboard | ||
</button> | ||
``` | ||
Copying **dynamic** value (directive should recieve a function that returns value): | ||
@@ -52,2 +64,9 @@ | ||
Without plugin: | ||
```js | ||
import { Clipboard } from "v-clipboard" | ||
Clipboard.copy(value) | ||
``` | ||
### Events | ||
@@ -57,4 +76,4 @@ | ||
<button v-clipboard="foo" | ||
v-clipboard:success="clipboardSuccessHandler" // Success event handler | ||
v-clipboard:error="clipboardErrorHandler"> // Error event handler | ||
v-clipboard:success="clipboardSuccessHandler" | ||
v-clipboard:error="clipboardErrorHandler"> | ||
Copy to clipboard | ||
@@ -61,0 +80,0 @@ </button> |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
28220
97
0