{"name":"vue-clipboard2","version":"0.3.0","description":"A Vuejs2 binding for clipboard.js","main":"vue-clipboard.js","scripts":{"build":"$(npm bin)/eslint vue-clipboard.js && $(npm bin)/browserify browserify-me.js -o dist/vue-clipboard.js && $(npm bin)/uglifyjs dist/vue-clipboard.js -o dist/vue-clipboard.min.js && echo Success"},"repository":{"type":"git","url":"git+https://github.com/Inndy/vue-clipboard2.git"},"keywords":["vue","vue2","clipboard","clipboard.js"],"author":{"name":"Inndy"},"license":"MIT","bugs":{"url":"https://github.com/Inndy/vue-clipboard2/issues"},"homepage":"https://github.com/Inndy/vue-clipboard2#readme","peerDependecies":{"vue":"^2.0.0"},"dependencies":{"clipboard":"^2.0.0"},"devDependencies":{"browserify":"^16.1.0","eslint":">=5.0.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":">=2.13.0","eslint-plugin-node":">=7.0.0","eslint-plugin-promise":">=4.0.0","eslint-plugin-standard":">=4.0.0","uglify-js":"^3.3.12"},"gitHead":"964d4c8abe9706ab57d79f5327f37d5f6ede4caa","_id":"vue-clipboard2@0.3.0","_shasum":"b04d3f9a2d46f12ca85178445930b38463640b22","_from":".","_npmVersion":"3.5.2","_nodeVersion":"8.10.0","_npmUser":{"name":"inndy","email":"inndy.tw@gmail.com"},"dist":{"shasum":"b04d3f9a2d46f12ca85178445930b38463640b22","tarball":"http://registry-npm.ywwl.com/vue-clipboard2/download/vue-clipboard2-0.3.0.tgz","integrity":"sha512-6/Y9NJErWb4LNBLMgsJSdKb7KpF6/jqXagvKlYut6VQzQsNj6515FpwH0r5hhmeJMqaPzf1kxAw8L8Qvw/QBJQ==","fileCount":10,"unpackedSize":37925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYUBwCRA9TVsSAnZWagAArNgP/35YfTr8sQ39oPcJItOn\nN5cNXeNoyqQv8XwTKGZ4up3LRlSSI0CjmC8HnCBkeuXFs/u3rZ8e3nKKDyGr\nCpzdSZ5XJUw3vdkuvJu9QeNuZkToS+b3P1lNto5T3V3FggZ55kpKjICJaubl\nrcVWBYI37vKUl9vxYUQzyHzyj2/q8zdhKV2NolahsMdSB5UN0vU8o6d7H5sd\nzDh7YKYYYJ8hplG2rKWrsCswdh98P4cyRyaQLgz8sGllQ/LGh8APV8ae8uKy\n2GWVrmHT0Q55kHSwBRuN4gYg2878/1BOdThsHBodr8vmCM+5tQVmEmoVE1K6\nFD0RRAJIYssVdT5Kf+z1JDqTy1ZmiNaF1n3uA7CrAZUcqNLQQqeqp7yJrOMp\nL+ni+2q1vRXYu0REuWSpO6caU18+jjRh0GTa9yLULjIzJWoOTAojNLS7BdDm\nERS+bVoWe4TV3kaISi7DMw2W5rSOYNJ0O7ciMFZFBZ75f8iJsuKFKZXDIYq2\nD6rP0c5IGJMgjukVtmvXjg/JdexsstoYt40UWs6USusI3aouXkb74UpLxgmH\nl5ax3RBPNGL6pbJ2x918cMmxOXp7+gsG0WrfKWrrr7JJjgNHzoOVF6+dP7uZ\nTGtfjmW6lr9hXb6SKA43SBxbJ+Vid4ACZCkSMfKsDlF1WNhVPP/IQIDB4oGP\nypmP\r\n=sC1V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDv2pya3xJkVtxA6uwDN/JgyG6QPoMRozPejMzX23BKWQIhAJxdqaLaU7pDazUEKju/Bs15VW+b+v1hYdr0S4swNyUc"}],"size":8088,"noattachment":false,"key":"/vue-clipboard2/-/vue-clipboard2-0.3.0.tgz"},"maintainers":[{"name":"inndy","email":"inndy.tw@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-clipboard2_0.3.0_1549877359832_0.8527545101668788"},"_hasShrinkwrap":false,"readme":"# vue-clipboard2\n\nA simple vuejs 2 binding for clipboard.js\n\n## Install\n\n`npm install --save vue-clipboard2` or use `dist/vue-clipboard.min.js` without webpack\n\n## Usage\n\nFor vue-cli user:\n\n```javascript\nimport Vue from 'vue'\nimport VueClipboard from 'vue-clipboard2'\n\nVue.use(VueClipboard)\n```\n\nFor standalone usage:\n\n```html\n<script src=\"vue.min.js\"></script>\n<!-- must place this line after vue.js -->\n<script src=\"dist/vue-clipboard.min.js\"></script>\n```\n\n## I want to copy texts without a specific button!\n\nYes, you can do it by using our new method: `this.$copyText`. See\n[sample2](https://github.com/Inndy/vue-clipboard2/blob/master/samples/sample2.html),\nwhere we replace the clipboard directives with a v-on directive.\n\nModern browsers have some limitations like that you can't use `window.open` without a user interaction.\nSo there's the same restriction on copying things! Test it before you use it. Make sure you are not\nusing this method inside any async method.\n\nBefore using this feature, read:\n[this issue](https://github.com/zenorocha/clipboard.js/issues/218) and\n[this page](https://github.com/zenorocha/clipboard.js/wiki/Known-Limitations) first.\n\n## It doesn't work with bootstrap modals\n\nSee [clipboardjs](https://clipboardjs.com/#advanced-usage) document and [this pull request](https://github.com/Inndy/vue-clipboard2/pull/23), `container` option is available like this:\n\n```js\nlet container = this.$refs.container\nthis.$copyText(\"Text to copy\", container)\n```\n\nOr you can let `vue-clipboard2` set `container` to current element by doing this:\n\n```js\nimport Vue from 'vue'\nimport VueClipboard from 'vue-clipboard2'\n\nVueClipboard.config.autoSetContainer = true // add this line\nVue.use(VueClipboard)\n```\n\n## Sample\n\n```html\n<div id=\"app\"></div>\n\n<template id=\"t\">\n  <div class=\"container\">\n    <input type=\"text\" v-model=\"message\">\n    <button type=\"button\"\n      v-clipboard:copy=\"message\"\n      v-clipboard:success=\"onCopy\"\n      v-clipboard:error=\"onError\">Copy!</button>\n  </div>\n</template>\n\n<script>\nnew Vue({\n  el: '#app',\n  template: '#t',\n  data: function () {\n    return {\n      message: 'Copy These Text'\n    }\n  },\n  methods: {\n    onCopy: function (e) {\n      alert('You just copied: ' + e.text)\n    },\n    onError: function (e) {\n      alert('Failed to copy texts')\n    }\n  }\n})\n</script>\n```\n\n## Sample 2\n\n```html\n<div id=\"app\"></div>\n\n  <template id=\"t\">\n    <div class=\"container\">\n    <input type=\"text\" v-model=\"message\">\n    <button type=\"button\" @click=\"doCopy\">Copy!</button>\n    </div>\n  </template>\n\n  <script>\n  new Vue({\n    el: '#app',\n    template: '#t',\n    data: function () {\n      return {\n        message: 'Copy These Text'\n      }\n    },\n    methods: {\n      doCopy: function () {\n        this.$copyText(this.message).then(function (e) {\n          alert('Copied')\n          console.log(e)\n        }, function (e) {\n          alert('Can not copy')\n          console.log(e)\n        })\n      }\n    }\n  })\n  </script>\n\n```\n\nYou can use [your Vue instance ```vm.$el```](https://vuejs.org/v2/api/#vm-el) to get DOM elements via the usual traversal methods, e.g.:\n\n```this.$el.children[1].children[2].textContent```\n\nThis will allow you to access the *rendered* content of your components, rather than the components themselves.\n\n### Contribution\n\nPRs welcome, and issues as well! If you want any feature that we don't have currently,\nplease fire an issue for a feature request.\n\n### License\n\n[MIT License](https://github.com/Inndy/vue-clipboard2/blob/master/LICENSE)\n","publish_time":1549877359950,"_cnpm_publish_time":1549877359950,"dist-tags":{"latest":"0.3.3"}}