标签:tar click event color || move readonly read input
<input type="text" readonly="readonly" @click="cloneWe($event)"/>
1 cloneWe (event) { 2 let e = event || (event = window.event) 3 let input = e.target || e.srcElement 4 input.value = this.$t(‘title‘) 5 document.body.appendChild(input) 6 input.select() 7 input.setSelectionRange(0, input.value.length) 8 document.execCommand(‘Copy‘) 9 document.body.removeChild(input) 10 this.$toast.show(‘复制成功‘) 11 }
标签:tar click event color || move readonly read input
原文地址:https://www.cnblogs.com/QQPrincekin/p/11541235.html