...
|
...
|
@@ -19,6 +19,9 @@ layui.define(['element', 'admin'], function (exports) { |
|
|
|
|
|
that.bindClickEvent();
|
|
|
|
|
|
//lsq给带有title的元素绑定点击事件复制元素内容 2022-09-05
|
|
|
that.copyTitle();
|
|
|
|
|
|
if (that.data.contextmenus.length > 0) {
|
|
|
that.bindContextMenuEvent();
|
|
|
return that.data.contextmenus;
|
...
|
...
|
@@ -293,6 +296,25 @@ layui.define(['element', 'admin'], function (exports) { |
|
|
$(document).on('click', function (event) {
|
|
|
layer.closeAll('tips');
|
|
|
})
|
|
|
},
|
|
|
/**
|
|
|
* lsq
|
|
|
* 2022-09-13
|
|
|
* 给带有title的元素绑定点击事件
|
|
|
*/
|
|
|
copyTitle() {
|
|
|
$('[title]').unbind('click.title').on('click.title',(function (e){
|
|
|
e.preventDefault();
|
|
|
let oInput = document.createElement('input');
|
|
|
oInput.value = $(this).attr('title').trim();
|
|
|
document.body.appendChild(oInput);
|
|
|
oInput.select();
|
|
|
document.execCommand("Copy");
|
|
|
oInput.className = 'oInput';
|
|
|
oInput.style.display = 'none';
|
|
|
layer.msg('内容复制成功', {icon: 1, time: 2000});
|
|
|
|
|
|
}))
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|