|
@@ -19,6 +19,9 @@ layui.define(['element', 'admin'], function (exports) { |
|
@@ -19,6 +19,9 @@ layui.define(['element', 'admin'], function (exports) { |
19
|
|
19
|
|
20
|
that.bindClickEvent();
|
20
|
that.bindClickEvent();
|
21
|
|
21
|
|
|
|
22
|
+ //lsq给带有title的元素绑定点击事件复制元素内容 2022-09-05
|
|
|
23
|
+ that.copyTitle();
|
|
|
24
|
+
|
22
|
if (that.data.contextmenus.length > 0) {
|
25
|
if (that.data.contextmenus.length > 0) {
|
23
|
that.bindContextMenuEvent();
|
26
|
that.bindContextMenuEvent();
|
24
|
return that.data.contextmenus;
|
27
|
return that.data.contextmenus;
|
|
@@ -293,6 +296,25 @@ layui.define(['element', 'admin'], function (exports) { |
|
@@ -293,6 +296,25 @@ layui.define(['element', 'admin'], function (exports) { |
293
|
$(document).on('click', function (event) {
|
296
|
$(document).on('click', function (event) {
|
294
|
layer.closeAll('tips');
|
297
|
layer.closeAll('tips');
|
295
|
})
|
298
|
})
|
|
|
299
|
+ },
|
|
|
300
|
+ /**
|
|
|
301
|
+ * lsq
|
|
|
302
|
+ * 2022-09-13
|
|
|
303
|
+ * 给带有title的元素绑定点击事件
|
|
|
304
|
+ */
|
|
|
305
|
+ copyTitle() {
|
|
|
306
|
+ $('[title]').unbind('click.title').on('click.title',(function (e){
|
|
|
307
|
+ e.preventDefault();
|
|
|
308
|
+ let oInput = document.createElement('input');
|
|
|
309
|
+ oInput.value = $(this).attr('title').trim();
|
|
|
310
|
+ document.body.appendChild(oInput);
|
|
|
311
|
+ oInput.select();
|
|
|
312
|
+ document.execCommand("Copy");
|
|
|
313
|
+ oInput.className = 'oInput';
|
|
|
314
|
+ oInput.style.display = 'none';
|
|
|
315
|
+ layer.msg('内容复制成功', {icon: 1, time: 2000});
|
|
|
316
|
+
|
|
|
317
|
+ }))
|
296
|
}
|
318
|
}
|
297
|
}
|
319
|
}
|
298
|
|
320
|
|