剪切板的問題
我按照老師您的方法做了:
js代碼:
copy:function(){
wx.setClipboardData({
data: 'data',
success: function (res) {
wx.showModal({
title: '復制成功',
content: '內容已經復制成功',
})
}
})
}
wxml代碼:
<button ?bindtap='copy'>復制內容</button>
問題:
復制內容不起作用,基礎庫版本是最高版本
調試問題:
VM7597:1 Do not have copy handler in current page: pages/index/index. Please make sure that copy handler has been defined in pages/index/index, or pages/index/index has been added into app.json
2018-07-15
個人認為是您的.js代碼沒有寫在index.js中,位置可能寫錯了