39 lines
1.5 KiB
Plaintext
39 lines
1.5 KiB
Plaintext
layui.define(["layer"], function (exports) {
|
||
var layer = layui.layer;
|
||
var obj = {
|
||
rightPopupLayer: function (content, id) {
|
||
let layerIndex = layer.open({
|
||
type: 2,
|
||
title: false,
|
||
offset: ["0px", "100%"],
|
||
skin: "layui-anim layui-anim-rl layui-layer-adminRight",
|
||
closeBtn: 0,
|
||
content: content,
|
||
shadeClose: true,
|
||
area: ["42%", "100%"],
|
||
success: function (layero, index) {
|
||
let body = layer.getChildFrame('body', index);
|
||
let iframeWin = window[layero.find('iframe')[0]['name']];//获得iframe页的窗口对象,执行iframe页的方法:
|
||
iframeWin.setParams(id);//调用子页面的方法,页面锁定
|
||
}
|
||
});
|
||
let op_width = $(".layui-anim-rl").outerWidth();
|
||
$(".layui-layer-shade")
|
||
.off("click")
|
||
.on("click", function () {
|
||
$(".layui-anim-rl")
|
||
.animate(
|
||
{left: "+=" + op_width + "px"},
|
||
300,
|
||
"linear",
|
||
function () {
|
||
$(".layui-anim-rl").remove();
|
||
|
||
$(".layui-layer-shade").remove();
|
||
}
|
||
);
|
||
});
|
||
},
|
||
};
|
||
exports("rightPopup2", obj);
|
||
}); |