target/classes/static/js/layer.js

(开头部分) 28KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*! layer-v2.4 弹层组件 License LGPL  http://layer.layui.com/ By 贤心 */
;!function (a, b) {
    "use strict";
    var c, d, e = {
        getPath: function () {
            var a = document.scripts, b = a[a.length - 1], c = b.src;
            if (!b.getAttribute("merge")) return c.substring(0, c.lastIndexOf("/") + 1)
        }(),
        enter: function (a) {
            13 === a.keyCode && a.preventDefault()
        },
        config: {},
        end: {},
        btn: ["确定", "取消"],
        type: ["dialog", "page", "iframe", "loading", "tips"]
    }, f = {
        v: "2.4", ie6: !!a.ActiveXObject && !a.XMLHttpRequest, index: 0, path: e.getPath, config: function (a, b) {
            var d = 0;
            return a = a || {}, f.cache = e.config = c.extend(e.config, a), f.path = e.config.path || f.path, "string" == typeof a.extend && (a.extend = [a.extend]), f.use("skin/layer.css", a.extend && a.extend.length > 0 ? function g() {
                var c = a.extend;
                f.use(c[c[d] ? d : d - 1], d < c.length ? function () {
                    return ++d, g
                }() : b)
            }() : b), this
        }, use: function (a, b, d) {
            var e = c("head")[0], a = a.replace(/\s/g, ""), g = /\.css$/.test(a),
                h = document.createElement(g ? "link" : "script"), i = "layui_layer_" + a.replace(/\.|\//g, "");
            return f.path ? (g && (h.rel = "stylesheet"), h[g ? "href" : "src"] = /^http:\/\//.test(a) ? a : f.path + a, h.id = i, c("#" + i)[0] || e.appendChild(h), function j() {
                (g ? 1989 === parseInt(c("#" + i).css("width")) : f[d || i]) ? function () {
                    b && b();
                    try {
                        g || e.removeChild(h)
                    } catch (a) {
                    }
                }() : setTimeout(j, 100)
            }(), this) : void 0
        }, ready: function (a, b) {
            var d = "function" == typeof a;
            return d && (b = a), f.config(c.extend(e.config, function () {
                return d ? {} : {path: a}
            }()), b), this
        }, alert: function (a, b, d) {
            var e = "function" == typeof b;
            return e && (d = b), f.open(c.extend({content: a, yes: d}, e ? {} : b))
        }, confirm: function (a, b, d, g) {
            var h = "function" == typeof b;
            return h && (g = d, d = b), f.open(c.extend({content: a, btn: e.btn, yes: d, btn2: g}, h ? {} : b))
        }, msg: function (a, d, g) {
            var i = "function" == typeof d, j = e.config.skin, k = (j ? j + " " + j + "-msg" : "") || "layui-layer-msg",
                l = h.anim.length - 1;
            return i && (g = d), f.open(c.extend({
                content: a,
                time: 3e3,
                shade: !1,
                skin: k,
                title: !1,
                closeBtn: !1,
                btn: !1,
                end: g
            }, i && !e.config.skin ? {skin: k + " layui-layer-hui", shift: l} : function () {
后面还有 427 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。