vue 实现点击复制
2018-05-23 本文已影响0人
rookie_简书
<div>{{copys}}</div>
<div v-clipboard:copy="copys" v-clipboard:success="copy">复制</div>
data(){
return{
copys:'内容'
}
},
methods:{
copy(){
console.log('成功复制到粘贴板!')
}
}
<div>{{copys}}</div>
<div v-clipboard:copy="copys" v-clipboard:success="copy">复制</div>
data(){
return{
copys:'内容'
}
},
methods:{
copy(){
console.log('成功复制到粘贴板!')
}
}