From 6566e91c13ee73abcd6b7c48960210d012fa5327 Mon Sep 17 00:00:00 2001 From: Inndy Date: Mon, 3 Apr 2017 17:25:13 +0800 Subject: [PATCH] Update README --- README.md | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 995af09..fbdd630 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,38 @@ A simple vuejs 2 binding for clipboard.js ## Install -`npm install --save vue-clipboard2` or use `dist/vue-clipboard.js` without webpack +`npm install --save vue-clipboard2` or use `dist/vue-clipboard.min.js` without webpack ## Usage +For vue-cli user: + +```javascript +import Vue +import VueClipboard from 'vue-clipboard2' + +Vue.use(VueClipboard) +``` + +For standalone usage: + +```html + + + +``` + +## Sample + ```html
@@ -26,6 +47,11 @@ new Vue({ return { message: 'Copy These Text' } + }, + methods: { + onCopy: function (e) { + alert("You just copied: " + e.text) + } } })