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

https://github.com/vuecomponent/vue-copy-to-clipboard

Copy to clipboard Vue component
https://github.com/vuecomponent/vue-copy-to-clipboard

Last synced: 5 months ago
JSON representation

Copy to clipboard Vue component

Awesome Lists containing this project

README

          

vue-copy-to-cliboard
----

Copy to clipboard Vue component

### Use

```bash
$ npm install vue-copy-to-clipboard
or
$ yarn add vue-copy-to-clipboard
```

### Examples

```jsx
// by jsx
import CopyToClipboard from 'vue-copy-to-clipboard'

export default {
data () {
return {
text: 'is copy content'
}
},
render (h) {
return (


{
console.log('onCopy', result)
}}>
Copy to Clipboard


)
}
}
```

```vue



Copy to Clipboard

// by template.vue
import CopyToClipboard from 'vue-copy-to-clipboard'

export default {
components: {
CopyToClipboard
},
data () {
return {
text: '这里可以动态生成内容'
}
},
methods: {
handleCopy (result) {
console.log('onCopy', result)
}
}
}

```