Commit 97183c4b by 赵雅纹

复制文本

parent 4fe9c346
......@@ -29,19 +29,25 @@ Page({
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
copy(e) {
wx.setClipboardData({
//准备复制的数据
data: e.currentTarget.dataset.content,
success: function (res) {
wx.showToast({
title: '复制成功',
icon: 'none'
});
}
});
},
/**
* 生命周期函数--监听页面隐藏
*/
......
......@@ -15,12 +15,6 @@ Page({
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
......@@ -28,6 +22,19 @@ Page({
onShow: function () {
},
copy(e) {
wx.setClipboardData({
//准备复制的数据
data: e.currentTarget.dataset.content,
success: function (res) {
wx.showToast({
title: '复制成功',
icon: 'none'
});
}
});
},
/**
* 生命周期函数--监听页面隐藏
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment