点击按钮分享当前页面信息
<van-button @click="shareCustomers" v-preventReClick>分享</van-button>
shareCustomers(){
// 复制到粘贴板
const input = document.createElement('input')
input.setAttribute('readonly', 'readonly')
let url=window.location.href
input.setAttribute('value', url)
document.body.appendChild(input)
input.select()
if (document.execCommand('copy')) {
document.execCommand('copy')
Toast('链接已复制')
}
document.body.removeChild(input)
}