RuoYi/ruoyi-admin/src/main/resources/static/ajax/libs/layer/layer.min.js

2 lines
23 KiB
JavaScript
Raw Normal View History

2021-08-31 10:11:02 +08:00
/*! layer-v3.5.1 Web 通用弹出层组件 MIT License */
!function(i,d){var e=i.layui&&layui.define,f,h,j={getPath:function(){var m=document.currentScript?document.currentScript.src:function(){var p=document.scripts,o=p.length-1,q;for(var n=o;n>0;n--){if(p[n].readyState==="interactive"){q=p[n].src;break}}return q||p[o].src}(),l=i.LAYUI_GLOBAL||{};return l.layer_dir||m.substring(0,m.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["&#x786E;&#x5B9A;","&#x53D6;&#x6D88;"],type:["dialog","page","iframe","loading","tips"],getStyle:function(n,l){var m=n.currentStyle?n.currentStyle:i.getComputedStyle(n,null);return m[m.getPropertyValue?"getPropertyValue":"getAttribute"](l)},link:function(l,t,m){if(!g.path){return}var u=document.getElementsByTagName("head")[0],s=document.createElement("link");if(typeof t==="string"){m=t}var o=(m||l).replace(/\.|\//g,"");var n="layuicss-"+o,p="creating",r=0;s.rel="stylesheet";s.href=g.path+l;s.id=n;if(!document.getElementById(n)){u.appendChild(s)}if(typeof t!=="function"){return}(function q(v){var w=100,x=document.getElementById(n);if(++r>10*1000/w){return i.console&&console.error(o+".css: Invalid")}if(parseInt(j.getStyle(x,"width"))===1989){if(v===p){x.removeAttribute("lay-status")}x.getAttribute("lay-status")===p?setTimeout(q,w):t()}else{x.setAttribute("lay-status",p);setTimeout(function(){q(p)},w)}}())}};var g={v:"3.5.1",ie:function(){var l=navigator.userAgent.toLowerCase();return(!!i.ActiveXObject||"ActiveXObject" in i)?((l.match(/msie\s(\d+)/)||[])[1]||"11"):false}(),index:(i.layer&&i.layer.v)?100000:0,path:j.getPath,config:function(l,m){l=l||{};g.cache=j.config=f.extend({},j.config,l);g.path=j.config.path||g.path;typeof l.extend==="string"&&(l.extend=[l.extend]);if(j.config.path){g.ready()}if(!l.extend){return this}e?layui.addcss("modules/layer/"+l.extend):j.link("theme/"+l.extend);return this},ready:function(o){var m="layer",l="",n=(e?"modules/layer/":"theme/")+"default/layer.css?v="+g.v+l;e?layui.addcss(n,o,m):j.link(n,o,m);return this},alert:function(n,l,o){var m=typeof l==="function";if(m){o=l}return g.open(f.extend({content:n,yes:o},m?{}:l))},confirm:function(o,l,p,n){var m=typeof l==="function";if(m){n=p;p=l}return g.open(f.extend({content:o,btn:j.btn,yes:p,btn2:n},m?{}:l))},msg:function(o,m,l){var n=typeof m==="function",r=j.config.skin;var q=(r?r+" "+r+"-msg":"")||"layui-layer-msg";var p=c.anim.length-1;if(n){l=m}return g.open(f.extend({content:o,time:3000,shade:false,skin:q,title:false,closeBtn:false,btn:false,resize:false,end:l},(n&&!j.config.skin)?{skin:q+" layui-layer-hui",anim:p}:function(){m=m||{};if(m.icon===-1||m.icon===d&&!j.config.skin){m.skin=q+" "+(m.skin||"layui-layer-hui")}return m}()))},load:function(m,l){return g.open(f.extend({type:3,icon:m||0,resize:false,shade:0.01},l))},tips:function(n,l,m){return g.open(f.extend({type:4,content:[n,l],closeBtn:false,time:3000,shade:false,resize:false,fixed:false,maxWidth:260},m))}};var b=function(m){var n=this,l=function(){n.creat()};n.index=++g.index;n.config.maxWidth=f(h).width()-15*2;n.config=f.extend({},n.config,j.config,m);document.body?l():setTimeout(function(){l()},30)};b.pt=b.prototype;var c=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];c.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"];c.SHADE="layui-layer-shade";c.MOVE="layui-layer-move";b.pt.config={type:0,shade:0.3,fixed:true,move:c[1],title:"&#x4FE1;&#x606F;",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:true,minStack:true,icon:-1,moveType:1,resize:true,scrollbar:true,tips:2};b.pt.vessel=function(p,t){var q=this,l=q.index,o=q.config;var s=o.zIndex+l,n=typeof o.title==="object";var r=o.maxmin&&(o.type===1||o.type===2);var m=(o.title?'<div class="layui-layer-title" style="'+(n?o.title[1]:"")+'">'+(n?o.title[0]:o.title)+"</div>":"");o.zIndex=s;t([o.shade?('<div class="'+c.SHADE+'" id="'+c.SHADE+l+'" times="'+l+'" style="'+("z-index:"+(s-1)+"; ")+'"></div>'):"",'<div class="'+c[0]+(" l