115 lines
4.2 KiB
Plaintext
115 lines
4.2 KiB
Plaintext
|
|
// layer 自定义右侧呼出(全屏)
|
|||
|
|
layui.define(["layer"], function (exports) {
|
|||
|
|
var layer = layui.layer;
|
|||
|
|
var obj = {
|
|||
|
|
rightPopupLayer: function (content, id) {
|
|||
|
|
let layerIndex = layer.open({
|
|||
|
|
type: 2,
|
|||
|
|
title: "",
|
|||
|
|
offset: ["0px", "100%"],
|
|||
|
|
skin: "layui-anim layui-anim-rl layui-layer-adminRight",
|
|||
|
|
closeBtn: 0,
|
|||
|
|
content: content,
|
|||
|
|
shadeClose: true,
|
|||
|
|
area: ["100%", "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("rightPopup", obj);
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
|
|||
|
|
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);
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
// layer 自定义右侧呼出(非全屏)
|
|||
|
|
layui.define(["layer"], function (exports) {
|
|||
|
|
var layer = layui.layer;
|
|||
|
|
var obj = {
|
|||
|
|
rightPopupLayer: function (content = "") {
|
|||
|
|
layer.open({
|
|||
|
|
type: 1,
|
|||
|
|
title: "",
|
|||
|
|
offset: ["10px", "100%"],
|
|||
|
|
skin: "layui-anim layui-anim-rl layui-layer-adminRight",
|
|||
|
|
closeBtn: 0,
|
|||
|
|
content: content,
|
|||
|
|
shadeClose: true,
|
|||
|
|
area: ["30%", "96%"],
|
|||
|
|
});
|
|||
|
|
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("rightPopup3", obj);
|
|||
|
|
});
|