Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhuowenli/vue-clipboards
📋 Vue2.0 directive to copy or cut text to clipboard.
https://github.com/zhuowenli/vue-clipboards
clipboard vue
Last synced: 5 days ago
JSON representation
📋 Vue2.0 directive to copy or cut text to clipboard.
- Host: GitHub
- URL: https://github.com/zhuowenli/vue-clipboards
- Owner: zhuowenli
- License: mit
- Created: 2016-11-21T12:48:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-07-30T09:13:27.000Z (over 4 years ago)
- Last Synced: 2024-10-30T07:58:59.598Z (4 months ago)
- Topics: clipboard, vue
- Language: JavaScript
- Homepage: https://zhuowenli.github.io/vue-clipboards/
- Size: 7.06 MB
- Stars: 205
- Watchers: 4
- Forks: 31
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vue-clipboards
📋 Vue2.0 directive to copy or cut text to clipboard.
DEMO: [https://zhuowenli.github.io/vue-clipboards/](https://zhuowenli.github.io/vue-clipboards/)
## Install
```
$ npm install vue-clipboards
```## Usage
```js
import VueClipboards from 'vue-clipboards';Vue.use(VueClipboards);
new Vue({
data() {
return {
copyData: 'copy data'
}
}
});
``````html
Copy
```## Event
```html
Copy
``````js
import VueClipboards from 'vue-clipboards';Vue.use(VueClipboards);
new Vue({
data() {
return {
copyData: 'copy data'
}
},
methods: {
handleSuccess(e) {
console.log(e);
},
handleError(e) {
console.log(e);
},
}
});
```## Development
- `yarn dev`: Run example in development mode
- `yarn deploy`: Deploy example to gh-pages
- `yarn build`: Build component in umd & es format
- `yarn watch`: Build component in umd & es format with watch modeCheck out your npm scripts, it's using [vbuild](https://github.com/egoist/vbuild) under the hood.
---
Generated by [create-vue-app](https://github.com/egoist/create-vue-app)