标签:title success copy console tcl style 程序 target clipboard
1 <text data-data="111" bindtap=‘copyUrl‘>复制</text>
1 copyUrl(e) { 2 const data = e.currentTarget.dataset.data 3 wx.setClipboardData({ 4 data,//要复制的内容 5 success: function (res) { 6 wx.getClipboardData({ 7 success: function (res) { 8 console.log(res.data, 876) // data 9 wx.showToast({ 10 icon: ‘none‘, 11 title: ‘直播地址已复制,请打开浏览器查看。‘, 12 }) 13 } 14 }) 15 } 16 }) 17 },
标签:title success copy console tcl style 程序 target clipboard
原文地址:https://www.cnblogs.com/studyWeb/p/13439484.html