wxml
<button plain="true" size="mini" bindtap="OnClick" data-value="copy">复制</button>
js
OnClick(e) { console.log(\'点击了复制按钮\') console.log(\'接受到参数:\',e.currentTarget.dataset.value) wx.setClipboardData({ data: \'要复制的数据\', success: function (res) { console.log("复制成功:", res) }, }) }
获取到的参数
效果