onShareAppMessage(res){ if (res.from === 'button') { } return { title: '转发', path: '/pages/echarts/echarts?jsonStr=' + "测试信息", success: function (res) { console.log('成功', res) } } }
<Button onClick={this.clearApp} openType='share'>剪切板测试</Button>
clearApp(){ Taro.setClipboardData({ data: 'data', success: function (res) { Taro.getClipboardData({ success: function (res) { console.log(res.data) // data } }) } }) }