Authored by wangtao

Merge branch 'master-500-dev' of http://113.200.75.45:82/monitor_v3/hg-monitor-w…

…eb into master-500-dev
... ... @@ -3895,6 +3895,11 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
}
}
})
//lsq 带有title的元素点击复制元素内容 2022-09-23
setTimeout(function(){
layui.pageTips.copyTitle();
},1000)
},
yes: function (index) {
layer.close(index);
... ... @@ -4090,6 +4095,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
$btn.removeClass("hide");
}
});
//lsq 带有title的元素点击复制元素内容 2022-09-23
layui.pageTips.copyTitle();
filterSuppressMonitor(resId)
}
});
... ...
... ... @@ -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});
}))
}
}
... ...