⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
invoice
/
node_modules
/
v-clipboard
/
View File Name :
README.md
[](https://badge.fury.io/js/v-clipboard) ## Vue.js Clipboard ### Install ```bash npm install --save v-clipboard ``` ```javascript import Vue from 'vue' import Clipboard from 'v-clipboard' Vue.use(Clipboard) ``` ### Using > 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): ```vue <button v-clipboard="value"> Copy to clipboard </button> ``` Copying **dynamic** value (directive should recieve a function that returns value): ```vue <button v-clipboard="() => value"> Copy to clipboard </button> ``` Copying **anything** in your methods: ```js this.$clipboard(value) ``` ### Events ```vue <button v-clipboard="foo" v-clipboard:success="clipboardSuccessHandler" // Success event handler v-clipboard:error="clipboardErrorHandler"> // Error event handler Copy to clipboard </button> ``` ```js { methods: { clipboardSuccessHandler ({ value, event }) { console.log('success', value) }, clipboardErrorHandler ({ value, event }) { console.log('error', value) } } } ``` ### Compatibility <p align="center"> <img src="https://user-images.githubusercontent.com/1577802/28269902-8ae0e01e-6afb-11e7-9981-d4965bac69d1.png"> </p>