万材erp项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
30 KiB

2 years ago
/*! layDate v5.3.0 | 日期与时间组件 | The MIT License */
;!function(){"use strict";var e="lay",t=window.document,n=function(e){return new a(e)},a=function(e){for(var n=0,a="object"==typeof e?[e]:(this.selector=e,t.querySelectorAll(e||null));n<a.length;n++)this.push(a[n])};a.prototype=[],a.prototype.constructor=a,n.extend=function(){var e=1,t=arguments,n=function(e,t){e=e||(t.constructor===Array?[]:{});for(var a in t)e[a]=t[a]&&t[a].constructor===Object?n(e[a],t[a]):t[a];return e};for(t[0]="object"==typeof t[0]?t[0]:{};e<t.length;e++)"object"==typeof t[e]&&n(t[0],t[e]);return t[0]},n.v="1.0.6",n.ie=function(){var e=navigator.userAgent.toLowerCase();return!!(window.ActiveXObject||"ActiveXObject"in window)&&((e.match(/msie\s(\d+)/)||[])[1]||"11")}(),n.getPath=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,n=t.scripts,a=n.length-1,i=a;i>0;i--)if("interactive"===n[i].readyState){e=n[i].src;break}return e||n[a].src}();return e.substring(0,e.lastIndexOf("/")+1)},n.stope=function(e){e=e||window.event,e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},n.each=function(e,t){var n,a=this;if("function"!=typeof t)return a;if(e=e||[],e.constructor===Object){for(n in e)if(t.call(e[n],n,e[n]))break}else for(n=0;n<e.length&&!t.call(e[n],n,e[n]);n++);return a},n.digit=function(e,t,n){var a="";e=String(e),t=t||2;for(var i=e.length;i<t;i++)a+="0";return e<Math.pow(10,t)?a+(0|e):e},n.elem=function(e,a){var i=t.createElement(e);return n.each(a||{},function(e,t){i.setAttribute(e,t)}),i},n.getStyle=function(e,t){var n=e.currentStyle?e.currentStyle:window.getComputedStyle(e,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](t)},n.link=function(e,a,i){var r=t.getElementsByTagName("head")[0],l=t.createElement("link");"string"==typeof a&&(i=a);var o=(i||e).replace(/\.|\//g,""),s="layuicss-"+o,c="creating",y=0;l.rel="stylesheet",l.href=e,l.id=s,t.getElementById(s)||r.appendChild(l),"function"==typeof a&&!function d(e){var i=100,r=t.getElementById(s);return++y>1e4/i?window.console&&console.error(o+".css: Invalid"):void(1989===parseInt(n.getStyle(r,"width"))?(e===c&&r.removeAttribute("lay-status"),r.getAttribute("lay-status")===c?setTimeout(d,i):a()):(r.setAttribute("lay-status",c),setTimeout(function(){d(c)},i)))}()},n.hasScrollbar=function(){return t.body.scrollHeight>(window.innerHeight||t.documentElement.clientHeight)},n.position=function(e,a,i){if(a){i=i||{},e!==t&&e!==n("body")[0]||(i.clickType="right");var r="right"===i.clickType?function(){var e=i.e||window.event||{};return{left:e.clientX,top:e.clientY,right:e.clientX,bottom:e.clientY}}():e.getBoundingClientRect(),l=a.offsetWidth,o=a.offsetHeight,s=function(e){return e=e?"scrollLeft":"scrollTop",t.body[e]|t.documentElement[e]},c=function(e){return t.documentElement[e?"clientWidth":"clientHeight"]},y=5,d=r.left,u=r.bottom;d+l+y>c("width")&&(d=c("width")-l-y),u+o+y>c()&&(r.top>o+y?u=r.top-o-2*y:"right"===i.clickType&&(u=c()-o-2*y,u<0&&(u=0)));var m=i.position;if(m&&(a.style.position=m),a.style.left=d+("fixed"===m?0:s(1))+"px",a.style.top=u+("fixed"===m?0:s())+"px",!n.hasScrollbar()){var h=a.getBoundingClientRect();!i.SYSTEM_RELOAD&&h.bottom+y>c()&&(i.SYSTEM_RELOAD=!0,setTimeout(function(){n.position(e,a,i)},50))}}},n.options=function(e,t){var a=n(e),i=t||"lay-options";try{return new Function("return "+(a.attr(i)||"{}"))()}catch(r){return hint.error("parseerror\uff1a"+r,"error"),{}}},n.isTopElem=function(e){var a=[t,n("body")[0]],i=!1;return n.each(a,function(t,n){if(n===e)return i=!0}),i},a.addStr=function(e,t){return e=e.replace(/\s+/," "),t=t.replace(/\s+/," ").split(" "),n.each(t,function(t,n){new RegExp("\\b"+n+"\\b").test(e)||(e=e+" "+n)}),e.replace(/^\s|\s$/,"")},a.removeStr=function(e,t){return e=e.replace(/\s+/," "),t=t.replace(/\s+/," ").split(" "),n.each(t,function(t,n){var a=new RegExp("\\b"+n+"\\b");a.test(e)&&(e=e.replace(a,""))}),e.replace(/\s+/," ").replace(/^\s|\s$/,"")},a.prototype.find=function(e){var t=this,a=0,i=[],r="object"==typeof e;return this.each(function(n,l){for(var o=r?l.contains(e):l.querySelectorAll(e||null);a<o.length;a++)i.push(o[a]);t.shift()}),r||(t.selector=(t.sele