|
|
/*! layer-v3.1.0 Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */ ; !function (e, t) { "use strict"; var i, n, a = e.layui && layui.define, o = { getPath: function () { var e = document.scripts, t = e[e.length - 1], i = t.src; if (!t.getAttribute("merge")) return i.substring(0, i.lastIndexOf("/") + 1) }(), config: {}, end: {}, minIndex: 0, minLeft: [], btn: ["确定", "取消"], type: ["dialog", "page", "iframe", "loading", "tips"], getStyle: function (t, i) { var n = t.currentStyle ? t.currentStyle : e.getComputedStyle(t, null); return n[n.getPropertyValue ? "getPropertyValue" : "getAttribute"](i) }, link: function (t, i, n) { if (r.path) { var a = document.getElementsByTagName("head")[0], s = document.createElement("link"); "string" == typeof i && (n = i); var l = (n || t).replace(/\.|\//g, ""), f = "layuicss-" + l, c = 0; s.rel = "stylesheet", s.href = r.path + t, s.id = f, document.getElementById(f) || a.appendChild(s), "function" == typeof i && !function u() { return ++c > 80 ? e.console && console.error("layer.css: Invalid") : void (1989 === parseInt(o.getStyle(document.getElementById(f), "width")) ? i() : setTimeout(u, 100)) }() } } }, r = { v: "3.1.0", ie: function () { var t = navigator.userAgent.toLowerCase(); return !!(e.ActiveXObject || "ActiveXObject" in e) && ((t.match(/msie\s(\d+)/) || [])[1] || "11") }(), index: e.layer && e.layer.v ? 1e5 : 0, path: o.getPath, config: function (e, t) { return e = e || {}, r.cache = o.config = i.extend({}, o.config, e), r.path = o.config.path || r.path, "string" == typeof e.extend && (e.extend = [e.extend]), o.config.path && r.ready(), e.extend ? (a ? layui.addcss("modules/layer/" + e.extend) : o.link("theme/" + e.extend), this) : this }, ready: function (e) { var t = "layer", i = "", n = (a ? "modules/layer/" : "theme/") + "default/layer.css?v=" + r.v + i; return a ? layui.addcss(n, e, t) : o.link(n, e, t), this }, alert: function (e, t, n) { var a = "function" == typeof t; return a && (n = t), r.open(i.extend({ content: e, yes: n }, a ? {} : t)) }, confirm: function (e, t, n, a) { var s = "function" == typeof t; return s && (a = n, n = t), r.open(i.extend({ content: e, btn: o.btn, yes: n, btn2: a }, s ? {} : t)) }, msg: function (e, n, a) { var s = "function" == typeof n, f = o.config.skin, c = (f ? f + " " + f + "-msg" : "") || "layui-layer-msg", u = l.anim.length - 1; return s && (a = n), r.open(i.extend({ content: e, time: 3e3, shade: !1, skin: c, title: !1, closeBtn: !1, btn: !1, resize: !1, end: a }, s && !o.config.skin ? { skin: c + " layui-layer-hui", anim: u } : function () { return n = n || {}, (n.icon === -1 || n.icon === t && !o.config.skin) && (n.skin = c + " " + (n.skin || "layui-layer-hui")), n }())) }, load: function (e, t) { return r.open(i.extend({ type: 3, icon: e || 0, resize: !1, shade: .01 }, t)) }, tips: function (e, t, n) { return r.open(i.extend({ type: 4, content: [e, t], closeBtn: !1, time: 3e3, shade: !1, resize: !1, fixed: !1, maxWidth: 210 }, n)) } }, s = function (e) { var t = this; t.index = ++r.index, t.config = i.extend({}, t.config, o.config, e), document.body ? t.creat() : setTimeout(function () { t.creat() }, 30) }; s.pt = s.prototype; var l = ["layui-layer", ".layui-layer-title", ".layui-layer-main", ".layui-layer-dialog", "layui-layer-iframe", "layui-layer-content", "layui-layer-btn", "layui-layer-close"]; l.anim = ["layer-anim-00", "layer-anim-01", "layer-anim-02", "layer-anim-03", "layer-anim-04", "layer-anim-05", "layer-anim-06"], s.pt.config = { type: 0, shade: .3, fixed: !0, move: l[1], title: "信息", offset: "auto", area: "auto", closeBtn: 1, time: 0, zIndex: 19891014, maxWidth: 360, anim: 0, isOutAnim: !0, icon: -1, moveType: 1, resize: !0, scrollbar: !0, tips: 2 }, s.pt.vessel = function (e, t) { var n = this, a = n.index, r = n.config, s = r.zIndex + a, f = "object" == typeof r.title, c = r.maxmin && (1 === r.type || 2 === r.type), u = r.title ? '<div class="layui-layer-title" style="' + (f ? r.title[1] : "") + '">' + (f ? r.title[0] : r.title) + "</div>" : ""; return r.zIndex = s, t([r.shade ? '<div class="layui-layer-shade" id="layui-layer-shade' + a + '"
|