Commit 64f4c917 authored by 赵灿灿's avatar 赵灿灿

升级layer.js

parent 2ae63067
Pipeline #24180 passed with stages
in 4 minutes and 42 seconds
/*! layer Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */
;!function (e, t) {
"use strict";
var i, n, a = e.layui && layui.define, o = {
......@@ -38,18 +38,29 @@
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) {
},
htmlEncode: function (str) {
if (typeof str !== 'string' || str === '') return str;
var div = document.createElement('div');
div.textContent = str;
return div.innerHTML;
},
ready: function (e) {
var t = "layer", i = "", n = (a ? "modules/layer/" : "theme/") + "default/layer.css?v=" + r.v + i;
e = r.htmlEncode(e);
return a ? layui.addcss(n, e, t) : o.link(n, e, t), this
}, alert: function (e, t, n) {
var a = "function" == typeof t;
e = r.htmlEncode(e);
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;
e = r.htmlEncode(e);
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;
e = r.htmlEncode(e);
return s && (a = n), r.open(i.extend({
content: e,
time: 3e3,
......@@ -64,8 +75,10 @@
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) {
e = r.htmlEncode(e);
return r.open(i.extend({type: 3, icon: e || 0, resize: !1, shade: .01}, t))
}, tips: function (e, t, n) {
e = r.htmlEncode(e);
return r.open(i.extend({
type: 4,
content: [e, t],
......
/*! layer Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */
;!function (e, t) {
"use strict";
var i, n, a = e.layui && layui.define, o = {
......@@ -38,18 +38,29 @@
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) {
},
htmlEncode: function (str) {
if (typeof str !== 'string' || str === '') return str;
var div = document.createElement('div');
div.textContent = str;
return div.innerHTML;
},
ready: function (e) {
var t = "layer", i = "", n = (a ? "modules/layer/" : "theme/") + "default/layer.css?v=" + r.v + i;
e = r.htmlEncode(e);
return a ? layui.addcss(n, e, t) : o.link(n, e, t), this
}, alert: function (e, t, n) {
var a = "function" == typeof t;
e = r.htmlEncode(e);
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;
e = r.htmlEncode(e);
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;
e = r.htmlEncode(e);
return s && (a = n), r.open(i.extend({
content: e,
time: 3e3,
......@@ -64,8 +75,10 @@
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) {
e = r.htmlEncode(e);
return r.open(i.extend({type: 3, icon: e || 0, resize: !1, shade: .01}, t))
}, tips: function (e, t, n) {
e = r.htmlEncode(e);
return r.open(i.extend({
type: 4,
content: [e, t],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment