Wx-小程序-长按复制文本
view:
<text bindlongtap='copy' data-name='{{name}}'>{{item.name}}</text>
js:
copy(e) { var that = this; wx.setClipboardData({ data: e.currentTarget.dataset.name, success: function (res) { wx.showToast({ title: '复制成功', icon: 'success', duration: 1200, mask: true }); } }); },
蜉蝣过山亦有风