
tips(html, ele) {
let style = document.createElement("style");
style.appendChild(document.createTextNode(" /*帮助提示框*/\n" +
" body .zmn-tips {\n" +
"\n" +
" }\n" +
"\n" +
" body .zmn-tips .layui-layer-content {\n" +
" color: #0C0C0C;\n" +
" background-color: #e6e6e6;\n" +
" padding-right: 3px;\n" +
" width: 396px;\n" +
" height: 300px;\n" +
" overflow-x: hidden;\n" +
" overflow-y: scroll;\n" +
" }\n" +
"\n" +
" body .zmn-tips .layui-layer-content::-webkit-scrollbar-track {\n" +
" background-color: #e6b31a;\n" +
" }\n" +
"\n" +
" body i.layui-layer-TipsB, i.layui-layer-TipsT, i.layui-layer-TipsL, i.layui-layer-TipsR, i.layui-layer-TipsG {\n" +
" border-right-color: #e6e6e6;\n" +
" }\n" +
"\n" +
" body .layui-layer-tips i.layui-layer-TipsB, .layui-layer-tips i.layui-layer-TipsT {\n" +
" border-right-color: #e6e6e6;\n" +
" }"));
let head = document.getElementsByTagName("head")[0];
head.appendChild(style);
layui.layer.open({
type: 4
, closeBtn: false
, shade: 0.0001
, tips: 1
, skin: 'zmn-tips'
, shadeClose: true
, content: [html, ele]
});
},
var done = function (res) {
$("div[lay-event='LAYTABLE_EXPORT']").attr('lay-event', 'CUSTOM_EXPORT');
let hasHelpBtn = $('[lay-event=CUSTOM_HELP]').length !== 0;
if (!hasHelpBtn) {
$(".layui-table-tool-self").prepend(toolbar_help.innerHTML);
}
};
table.on('toolbar(erp-ReportForms-Table)', function (obj) {
if (obj.event === 'CUSTOM_HELP') {
erpUtil.tips(help_content.innerHTML, this);
}
});
<script type="text/html" id="toolbar_help">
<div class="layui-inline" title="帮助" lay-event="CUSTOM_HELP"><i class="layui-icon layui-icon-help"></i></div>
</script>
<script type="text/html" id="help_content">
<div>
内容 <br/>
</div>
</script>