tool矿建增加box方法弹层

This commit is contained in:
hdm 2023-05-18 20:04:17 +08:00
parent c114d6edbc
commit deafb36bc6
2 changed files with 28 additions and 0 deletions

View File

@ -15,6 +15,7 @@
.layui-table-tool{box-shadow: 0 0 0 rgb(0 0 0 / 1%);} .layui-table-tool{box-shadow: 0 0 0 rgb(0 0 0 / 1%);}
.layui-input, .layui-select, .layui-textarea {height: 36px;line-height: 1.22;line-height: 36px\9;} .layui-input, .layui-select, .layui-textarea {height: 36px;line-height: 1.22;line-height: 36px\9;}
.layui-input, .layui-textarea {padding-left:6px;} .layui-input, .layui-textarea {padding-left:6px;}
.layui-form-pane .layui-form-label{height: 36px;}
.layui-btn {height: 36px;line-height: 36px; padding:0 16px;} .layui-btn {height: 36px;line-height: 36px; padding:0 16px;}
.layui-btn-sm {height: 30px; line-height: 30px; padding:0 8px;} .layui-btn-sm {height: 30px; line-height: 30px; padding:0 8px;}

View File

@ -45,6 +45,33 @@ layui.define([], function (exports) {
} }
}) })
}, },
box: function (url,title="内容", width=720,height=405) {
let that = this;
if (that.loading == true) {
return false;
}
that.loading = true;
layer.open({
type: 2,
title: title,
content: url,
area: [width+'px', height+'px'],
maxmin: true,
end: function(){
if (layui.pageTable) {
layui.pageTable.resize();
}
},
success: function (obj, index) {
var btn = '<div data-index="'+index+'" class="express-close" style="display:none;" title="关闭">关闭</div>';
obj.append(btn);
that.loading = false;
obj.on('click','.express-close', function () {
layer.close(index);
})
}
})
},
//右侧ajax请求的方式打开页面参考勾股DEV //右侧ajax请求的方式打开页面参考勾股DEV
open: function (url, width) { open: function (url, width) {
let that = this; let that = this;