Vue.js Clipboard plugin
(No dependencies, less than 2kb minified)
Install
Use
There are 2 ways of using this plugin:
- Using
v-clipboard="mymodel"
directive.
When an element that contains v-clipboard
directive is clicked, the value of mymodel
will be copied into clipboard.
- Using
this.$clipboard(value)
function.
This one is simple :-)
Examples
Option 1: Using template only.
Option 2: Using javascript call.