Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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 mode

Check 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)