微信页面复制粘贴的,clipboardJs在苹果手机无效
在你点击的元素上加一个空点击事件:onclick=""。因为ios不单纯支持on
<span id='logistics_no' style='color:#fff'>复制人内内容</span> <span class="sccn-list-share" data-clipboard-target="#logistics_no" onclick="">复制</span>
//复制 function clipboard() { var clipboard = new ClipboardJS('.sccn-list-share'); clipboard.on('success', function(e) { //console.info('Action:', e.action); //console.info('Text:', e.text); //console.info('Trigger:', e.trigger); e.clearSelection(); //提示 layer.open({ content: '复制成功' ,skin: 'msg' ,time: 1 }); }); clipboard.on('error', function(e) { //console.error('Action:', e.action); //console.error('Trigger:', e.trigger); }); }
相关推荐
郴州小程序 2020-06-13
xiaonao00 2020-05-27
且听真言 2020-05-15
znbvx 2020-03-09
xiaonao00 2020-03-03
cbao 2019-12-21
xiaonao00 2019-12-11
颤抖吧腿子 2019-12-05
liangliangshuo 2019-11-03
vqudominiapp 2019-09-08
82387864 2018-01-22
jetamiett 2018-04-12
wsjb00 2019-06-05
tumobi 2019-05-17
zzzerttt 2019-04-05
quiyo 2018-08-16
zonehh 2019-07-01
目尽地平线 2019-07-01