1 line
30 KiB
JavaScript
1 line
30 KiB
JavaScript
|
|
!function(a,b){"use strict";var d,e,i,j,k,l,m,c=a.layui&&layui.define,f={getPath:function(){var b=document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()?document.currentScript.src:function(){var c,d,a=document.getElementsByTagName("script"),b=a.length-1;for(d=b;d>0;d--)if("interactive"===a[d].readyState){c=a[d].src;break}return c||a[b].src}(),c=a.LAYUI_GLOBAL||{};return c.layer_dir||b.substring(0,b.lastIndexOf("/")+1)}(),config:{removeFocus:!0},end:{},beforeEnd:{},events:{resize:{}},minStackIndex:0,minStackArr:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(b,c){var d=b.currentStyle?b.currentStyle:a.getComputedStyle(b,null);return d[d.getPropertyValue?"getPropertyValue":"getAttribute"](c)},link:function(b,c,d){var e,h,i,j,k,l;g.path&&(e=document.getElementsByTagName("head")[0],h=document.createElement("link"),"string"==typeof c&&(d=c),i=(d||b).replace(/\.|\//g,""),j="layuicss-"+i,k="creating",l=0,h.rel="stylesheet",h.href=g.path+b,h.id=j,document.getElementById(j)||e.appendChild(h),"function"==typeof c&&!function m(b){var d=100,e=document.getElementById(j);return++l>1e4/d?a.console&&console.error(i+".css: Invalid"):(1989===parseInt(f.getStyle(e,"width"))?(b===k&&e.removeAttribute("lay-status"),e.getAttribute("lay-status")===k?setTimeout(m,d):c()):(e.setAttribute("lay-status",k),setTimeout(function(){m(k)},d)),void 0)}())}},g={v:"2.11.0",ie:function(){var b=navigator.userAgent.toLowerCase();return a.ActiveXObject||"ActiveXObject"in a?(b.match(/msie\s(\d+)/)||[])[1]||"11":!1}(),index:a.layer&&a.layer.v?1e5:0,path:f.getPath,config:function(a){return a=a||{},g.cache=f.config=d.extend({},f.config,a),g.path=f.config.path||g.path,"string"==typeof a.extend&&(a.extend=[a.extend]),f.config.path&&g.ready(),a.extend?(c?layui.addcss("modules/layer/"+a.extend):f.link("css/"+a.extend),this):this},ready:function(a){var b="layer",d="",e=(c?"modules/":"css/")+"layer.css?v="+g.v+d;return c?layui["layui.all"]?"function"==typeof a&&a():layui.addcss(e,a,b):f.link(e,a,b),this},alert:function(a,b,c){var e="function"==typeof b;return e&&(c=b),g.open(d.extend({content:a,yes:c},e?{}:b))},confirm:function(a,b,c,e){var h="function"==typeof b;return h&&(e=c,c=b),g.open(d.extend({content:a,btn:f.btn,yes:c,btn2:e},h?{}:b))},msg:function(a,c,e){var h="function"==typeof c,j=f.config.skin,k=(j?j+" "+j+"-msg":"")||"layui-layer-msg",l=i.anim.length-1;return h&&(e=c),g.open(d.extend({content:a,time:3e3,shade:!1,skin:k,title:!1,closeBtn:!1,btn:!1,resize:!1,end:e,removeFocus:!1},h&&!f.config.skin?{skin:k+" layui-layer-hui",anim:l}:function(){return c=c||{},(-1===c.icon||c.icon===b&&!f.config.skin)&&(c.skin=k+" "+(c.skin||"layui-layer-hui")),c}()))},load:function(a,b){return g.open(d.extend({type:3,icon:a||0,resize:!1,shade:.01,removeFocus:!1},b))},tips:function(a,b,c){return g.open(d.extend({type:4,content:[a,b],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:260,removeFocus:!1},c))}},h=function(a){var b=this,c=function(){b.creat()};b.index=++g.index,b.config.maxWidth=d(e).width()-30,b.config=d.extend({},b.config,f.config,a),document.body?c():setTimeout(function(){c()},30)};h.pt=h.prototype,i=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"],i.anim={0:"layer-anim-00",1:"layer-anim-01",2:"layer-anim-02",3:"layer-anim-03",4:"layer-anim-04",5:"layer-anim-05",6:"layer-anim-06",slideDown:"layer-anim-slide-down",slideLeft:"layer-anim-slide-left",slideUp:"layer-anim-slide-up",slideRight:"layer-anim-slide-right"},i.SHADE="layui-layer-shade",i.MOVE="layui-layer-move",j="LAYUI-LAYER-SHADE-KEY",k="LAYUI_LAYER_CONTENT_RECORD_HEIGHT",h.pt.config={type:0,shade:.3,fixed:!0,move:i[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,icon:-1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,minStack:!0,moveType:1,resize:!0,scrollbar:!0,tips:2},h.pt.vessel=function(a,b){var c=this,e=c.index,g=c.config,h=g.zIndex+e,j="object"==typeof g.title,k=g.maxmin&&(1===g.type||2===g.type),l=g.
|