You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.1 KiB
73 lines
2.1 KiB
3 years ago
|
/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */
|
||
|
;
|
||
|
layui.extend({
|
||
|
setter: "config",
|
||
|
admin: "lib/admin",
|
||
|
view: "lib/view"
|
||
|
}).define(["setter", "admin"],
|
||
|
function(a) {
|
||
|
var e = layui.setter,
|
||
|
i = layui.element,
|
||
|
n = layui.admin,
|
||
|
t = n.tabsPage,
|
||
|
d = layui.view,
|
||
|
l = function(a, d) {
|
||
|
var l, u = r("#LAY_app_tabsheader>li"),
|
||
|
b = a.replace(/(^http(s*):)|(\?[\s\S]*$)/g, "");
|
||
|
if (u.each(function(e) {
|
||
|
var i = r(this),
|
||
|
n = i.attr("lay-id");
|
||
|
n === a && (l = !0, t.index = e)
|
||
|
}), d = d || "新标签页", e.pageTabs) l || (setTimeout(function() {
|
||
|
r(s).append(['<div class="layadmin-tabsbody-item layui-show">', '<iframe src="' + a + '" frameborder="0" class="layadmin-iframe"></iframe>', "</div>"].join(""))
|
||
|
},
|
||
|
10), t.index = u.length, i.tabAdd(o, {
|
||
|
title: "<span>" + d + "</span>",
|
||
|
id: a,
|
||
|
attr: b
|
||
|
}));
|
||
|
else {
|
||
|
var y = n.tabsBody(n.tabsPage.index).find(".layadmin-iframe");
|
||
|
y[0].contentWindow.location.href = a
|
||
|
}
|
||
|
i.tabChange(o, a),
|
||
|
n.tabsBodyChange(t.index, {
|
||
|
url: a,
|
||
|
text: d
|
||
|
})
|
||
|
},
|
||
|
s = "#LAY_app_body",
|
||
|
o = "layadmin-layout-tabs",
|
||
|
r = layui.$;
|
||
|
r(window);
|
||
|
n.screen() < 2 && n.sideFlexible(),
|
||
|
//扩展 easyCropper
|
||
|
layui.extend({
|
||
|
'cropper':'{/}' + e.base + 'lib/extend/easyCropper/cropper',
|
||
|
'croppers':'{/}' + e.base + 'lib/extend/easyCropper/croppers',
|
||
|
'easyCropper':'{/}' + e.base + 'lib/extend/easyCropper/easyCropper'
|
||
|
}),
|
||
|
layui.config({
|
||
|
base: e.base + "modules/"
|
||
|
}),
|
||
|
layui.each(e.extend,
|
||
|
function(a, i) {
|
||
|
var n = {};
|
||
|
n[i] = "{/}" + e.base + "lib/extend/" + i,
|
||
|
layui.extend(n)
|
||
|
}),
|
||
|
layui.use('layer', function(){
|
||
|
layui.layer.config({
|
||
|
shade: [0.7, '#000']
|
||
|
,skin: 'layer-skin'
|
||
|
,move: false
|
||
|
// ,offset: '100px'
|
||
|
,resize: false
|
||
|
});
|
||
|
}),
|
||
|
d().autoRender(),
|
||
|
layui.use("common"),
|
||
|
a("index", {
|
||
|
openTabsPage: l
|
||
|
})
|
||
|
});
|