mtiano

mtiano VIP1

0F币 2024-08-27 15:37:30 加入

mtiano 最近的提问

mtiano 最近的文章

  • 2024-09-10 01:18:16中回答:

    copy: { type: 'even', class: 'layui-btn-xs layui-btn-warm', icon: 'layui-icon-add-circle-fine', url: '#', text: __('Copy'), title: __('Copy'), full:0, width:'', height:'', hidden:false, callback:async function (obj, row) { var url = row.data.code console.log(url) var textarea = document.createElement('textarea'); textarea.value = url; document.body.appendChild(textarea); textarea.select(); try { var successful = document.execCommand('copy'); var msg = successful ? '成功' : '失败'; console.log('链接已复制到剪贴板' + msg); alert("链接已复制到剪贴板"); } catch (err) { console.log('无法复制', err); alert("无法复制"); } document.body.removeChild(textarea); }, },