Comparing version 0.0.4-alpha.1 to 0.0.4-alpha.2
@@ -1,2 +0,2 @@ | ||
!function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var i=n(1),r=o(i),a=n(76),u=o(a),c=n(77),l=o(c);window.Dui=t.exports={Modal:r.default,Animate:u.default,Tip:l.default}},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=n(2),l=o(c),s=n(70),f=o(s),p=n(72),d=o(p),h=n(73),v=o(h),g=n(74),y=o(g),b=n(75),m=o(b);e.default=function(){var t=['<div class="dui-dialog <%= className %>" style="width: <%= width %>px; height: <%= height %>px">',"<% if(close) { %>",'<i class="dui-dialog-close J_dialog-close <%=closeClass %>" href="javascript:;"></i>',"<% } %>",'<% if(title != "" && type == "default") { %>','<div class="dui-dialog-hd">','<h3 class="dui-dialog-title"><%= title %></h3>',"</div>","<% } %>",'<% if(type == "custom") { %>','<div class="dui-dialog-custom-bd"><%= content %></div>',"<% } %>",'<% if(type == "default") { %>','<% if(contentHeight != "auto"){ %>','<div style="height: <%= contentHeight %>px;" class="dui-dialog-bd">',"<% }else { %>",'<div style="height: <%= contentHeight %>;max-height: <%= contentMaxHeight %>px" class="dui-dialog-bd">',"<% } %>","<%= content %>","</div>","<% if(ok || cancel) { %>",'<div class="dui-dialog-ft <%= btnPosClass %>">','<div class="dui-btn-list-g10">',"<% if(ok) { %>",'<a class="dui-btn-info J_dialog-ok" href="javascript:;"><%= okValue %></a>',"<% } %>","<% if(cancel) { %>",'<a class="dui-btn J_dialog-cancel" href="javascript:;"><%= cancelValue %></a>',"<% } %>","</div>","</div>","<% } %>","<% } %>","</div>"],e=function(e){function n(t){i(this,n);var e=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this)),o={type:"default",title:"提示",content:"内容",okValue:"确定",cancelValue:"取消",className:"",closeClass:d.default.closeIconClass,mask:!0,close:!0,ok:!1,cancel:!1,btnPos:"right",draggable:!1};return e.option=t,e.option=(0,f.default)({},o,e.option),e.init(),e}return a(n,e),u(n,[{key:"init",value:function(){this.handleOption(),this.show(),this.bindEvent(),this.handleDrag(),this.option.init&&this.option.init.apply(this)}},{key:"handleOption",value:function(){this.handleOptionWidth(),this.handleOptionHeight(),this.handleOptionButton(),this.handleOptionContentHeight()}},{key:"handleOptionWidth",value:function(){var t=this.option.width;t=t?parseInt(t):d.default.minWidth,d.default.minWidth-t>=0&&(t=d.default.minWidth),d.default.maxWidth-t<0&&(t=d.default.maxWidth),this.option.width=t}},{key:"handleOptionHeight",value:function(){var t=this.option.height;"auto"!=t&&(t=t?parseInt(t):d.default.minHeight,d.default.minHeight-t>=0&&(t=d.default.minHeight),d.default.maxHeight-t<0&&(t=d.default.maxHeight),this.option.height=t)}},{key:"handleOptionContentHeight",value:function(){var t=this.option.height,e=d.default.hdHeight,n=d.default.ftHeight,o=d.default.padding,i=d.default.maxHeight,r=void 0;if(this.option.ok||this.option.cancel?r=3*o:(r=2*o,n=0),""==this.option.title&&(e=0),"auto"==t){this.option.contentHeight="auto";var a=i-e-n-r;this.option.contentMaxHeight=a}else{var u=t-e-n-r;this.option.contentHeight=u}}},{key:"handleOptionButton",value:function(){var t=this.option.ok,e=this.option.cancel;if(null==t)this.option.ok=!1;else{var n="boolean"==typeof t;this.option.ok=!!t,this.option.okValue=n?this.option.okValue:t}if(null==e)this.option.ok=!1;else{var n="boolean"==typeof t;this.option.cancel=!!e,this.option.cancelValue=n?this.option.cancelValue:e}this.option.okFn&&(this.option.ok=!0),this.option.cancelFn&&(this.option.cancel=!0),this.option.btnPosClass="dui-dialog-ft-"+this.option.btnPos}},{key:"show",value:function(){var e=v.default.has(".dui-dialog-wrap").length;if(0==e&&this.option.mask){var n='<div class="dui-dialog-wrap"></div>';v.default.appendHTML(document.body,n)}var o=(0,l.default)(t.join("")),i=o(this.option);this.option.mask?this.dialogDom=v.default.appendHTML(v.default.find(".dui-dialog-wrap"),i):this.dialogDom=v.default.appendHTML(document.body,i)}},{key:"hide",value:function(){this.$emit("destroy"),this.destroy()}},{key:"destroy",value:function(){this.unBindEvent();var t;t=this.option.mask?v.default.has(v.default.find(".dui-dialog-wrap"),".dui-dialog").length:v.default.has(".dui-dialog").length,v.default.remove(this.dialogDom),1==t&&this.option.mask&&v.default.remove(v.default.find(".dui-dialog-wrap")),this.dialogDom=null}},{key:"_okFn",value:function(){this.$emit("ok"),this.option.okFn&&this.option.okFn.apply(this)}},{key:"_cancelFn",value:function(){this.$emit("cancel"),this.option.cancelFn&&this.option.cancelFn.apply(this),this.hide()}},{key:"_closeFn",value:function(){this.$emit("close"),this.hide()}},{key:"_escFn",value:function(t){t=t||window.event,"27"==t.keyCode&&this.hide()}},{key:"handleDrag",value:function(){if(this.option.draggable){var t=v.default.find(this.dialogDom,".dui-dialog-hd");v.default.addClass(t,"z-draggable"),m.default.startDrag(t,this.dialogDom,d.default.boundary(this.dialogDom),this)}}},{key:"bindEvent",value:function(){var t=this.okBtn=v.default.find(this.dialogDom,".J_dialog-ok"),e=this.cancelBtn=v.default.find(this.dialogDom,".J_dialog-cancel"),n=this.closeBtn=v.default.find(this.dialogDom,".J_dialog-close");t&&t.addEventListener("click",this.bindOkClick=this._okFn.bind(this),!1),e&&e.addEventListener("click",this.bindCancelClick=this._cancelFn.bind(this),!1),n&&n.addEventListener("click",this.bindCloseClick=this._closeFn.bind(this),!1),document.addEventListener("keydown",this.bindEscClick=this._escFn.bind(this),!1)}},{key:"unBindEvent",value:function(){var t=this.okBtn,e=this.cancelBtn,n=this.closeBtn;t&&t.removeEventListener("click",this.bindOkClick,!1),e&&e.removeEventListener("click",this.bindCancelClick,!1),n&&n.removeEventListener("click",this.bindCloseClick,!1),document.removeEventListener("keydown",this.bindEscClick,!1)}}]),n}(y.default);return e.alert=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"提示";return new e({title:n,content:t,okFn:function(){this.hide()}})},e.confirm=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"提示";return new Promise(function(o){new e({title:n,content:t,okFn:function(){o(),this.hide()},cancel:!0})})},e}()},function(t,e,n){function o(t,e,n){var o=d.imports._.templateSettings||d;n&&s(t,e,n)&&(e=void 0),t=h(t),e=r({},e,o,i);var w,_,j=r({},e.imports,o.imports,i),k=f(j),O=u(j,k),M=0,C=e.interpolate||m,E="__p += '",H=RegExp((e.escape||m).source+"|"+C.source+"|"+(C===p?b:m).source+"|"+(e.evaluate||m).source+"|$","g"),P="sourceURL"in e?"//# sourceURL="+e.sourceURL+"\n":"";t.replace(H,function(e,n,o,i,r,a){return o||(o=i),E+=t.slice(M,a).replace(x,c),n&&(w=!0,E+="' +\n__e("+n+") +\n'"),r&&(_=!0,E+="';\n"+r+";\n__p += '"),o&&(E+="' +\n((__t = ("+o+")) == null ? '' : __t) +\n'"),M=a+e.length,e}),E+="';\n";var S=e.variable;S||(E="with (obj) {\n"+E+"\n}\n"),E=(_?E.replace(v,""):E).replace(g,"$1").replace(y,"$1;"),E="function("+(S||"obj")+") {\n"+(S?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(w?", __e = _.escape":"")+(_?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+E+"return __p\n}";var D=a(function(){return Function(k,P+"return "+E).apply(void 0,O)});if(D.source=E,l(D))throw D;return D}var i=n(3),r=n(5),a=n(50),u=n(52),c=n(54),l=n(51),s=n(29),f=n(55),p=n(59),d=n(60),h=n(64),v=/\b__p \+= '';/g,g=/\b(__p \+=) '' \+/g,y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,b=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,m=/($^)/,x=/['\n\r\u2028\u2029\\]/g;t.exports=o},function(t,e,n){function o(t,e,n,o){return void 0===t||i(t,r[n])&&!a.call(o,n)?e:t}var i=n(4),r=Object.prototype,a=r.hasOwnProperty;t.exports=o},function(t,e){function n(t,e){return t===e||t!==t&&e!==e}t.exports=n},function(t,e,n){var o=n(6),i=n(20),r=n(33),a=i(function(t,e,n,i){o(e,r(e),t,i)});t.exports=a},function(t,e,n){function o(t,e,n,o){var a=!n;n||(n={});for(var u=-1,c=e.length;++u<c;){var l=e[u],s=o?o(n[l],t[l],l,n,t):void 0;void 0===s&&(s=t[l]),a?r(n,l,s):i(n,l,s)}return n}var i=n(7),r=n(8);t.exports=o},function(t,e,n){function o(t,e,n){var o=t[e];u.call(t,e)&&r(o,n)&&(void 0!==n||e in t)||i(t,e,n)}var i=n(8),r=n(4),a=Object.prototype,u=a.hasOwnProperty;t.exports=o},function(t,e,n){function o(t,e,n){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var i=n(9);t.exports=o},function(t,e,n){var o=n(10),i=function(){try{var t=o(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){function o(t,e){var n=r(t,e);return i(n)?n:void 0}var i=n(11),r=n(19);t.exports=o},function(t,e,n){function o(t){if(!a(t)||r(t))return!1;var e=i(t)?h:l;return e.test(u(t))}var i=n(12),r=n(14),a=n(13),u=n(18),c=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,s=Function.prototype,f=Object.prototype,p=s.toString,d=f.hasOwnProperty,h=RegExp("^"+p.call(d).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=o},function(t,e,n){function o(t){var e=i(t)?l.call(t):"";return e==r||e==a||e==u}var i=n(13),r="[object Function]",a="[object GeneratorFunction]",u="[object Proxy]",c=Object.prototype,l=c.toString;t.exports=o},function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){function o(t){return!!r&&r in t}var i=n(15),r=function(){var t=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=o},function(t,e,n){var o=n(16),i=o["__core-js_shared__"];t.exports=i},function(t,e,n){var o=n(17),i="object"==typeof self&&self&&self.Object===Object&&self,r=o||i||Function("return this")();t.exports=r},function(t,e){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(e,function(){return this}())},function(t,e){function n(t){if(null!=t){try{return i.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var o=Function.prototype,i=o.toString;t.exports=n},function(t,e){function n(t,e){return null==t?void 0:t[e]}t.exports=n},function(t,e,n){function o(t){return i(function(e,n){var o=-1,i=n.length,a=i>1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,u&&r(n[0],n[1],u)&&(a=i<3?void 0:a,i=1),e=Object(e);++o<i;){var c=n[o];c&&t(e,c,o,a)}return e})}var i=n(21),r=n(29);t.exports=o},function(t,e,n){function o(t,e){return a(r(t,e,i),t+"")}var i=n(22),r=n(23),a=n(25);t.exports=o},function(t,e){function n(t){return t}t.exports=n},function(t,e,n){function o(t,e,n){return e=r(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,u=r(o.length-e,0),c=Array(u);++a<u;)c[a]=o[e+a];a=-1;for(var l=Array(e+1);++a<e;)l[a]=o[a];return l[e]=n(c),i(t,this,l)}}var i=n(24),r=Math.max;t.exports=o},function(t,e){function n(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}t.exports=n},function(t,e,n){var o=n(26),i=n(28),r=i(o);t.exports=r},function(t,e,n){var o=n(27),i=n(9),r=n(22),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:o(e),writable:!0})}:r;t.exports=a},function(t,e){function n(t){return function(){return t}}t.exports=n},function(t,e){function n(t){var e=0,n=0;return function(){var a=r(),u=i-(a-n);if(n=a,u>0){if(++e>=o)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var o=500,i=16,r=Date.now;t.exports=n},function(t,e,n){function o(t,e,n){if(!u(n))return!1;var o=typeof e;return!!("number"==o?r(n)&&a(e,n.length):"string"==o&&e in n)&&i(n[e],t)}var i=n(4),r=n(30),a=n(32),u=n(13);t.exports=o},function(t,e,n){function o(t){return null!=t&&r(t.length)&&!i(t)}var i=n(12),r=n(31);t.exports=o},function(t,e){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}var o=9007199254740991;t.exports=n},function(t,e){function n(t,e){return e=null==e?o:e,!!e&&("number"==typeof t||i.test(t))&&t>-1&&t%1==0&&t<e}var o=9007199254740991,i=/^(?:0|[1-9]\d*)$/;t.exports=n},function(t,e,n){function o(t){return a(t)?i(t,!0):r(t)}var i=n(34),r=n(47),a=n(30);t.exports=o},function(t,e,n){function o(t,e){var n=a(t),o=!n&&r(t),s=!n&&!o&&u(t),p=!n&&!o&&!s&&l(t),d=n||o||s||p,h=d?i(t.length,String):[],v=h.length;for(var g in t)!e&&!f.call(t,g)||d&&("length"==g||s&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||c(g,v))||h.push(g);return h}var i=n(35),r=n(36),a=n(39),u=n(40),c=n(32),l=n(43),s=Object.prototype,f=s.hasOwnProperty;t.exports=o},function(t,e){function n(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o}t.exports=n},function(t,e,n){var o=n(37),i=n(38),r=Object.prototype,a=r.hasOwnProperty,u=r.propertyIsEnumerable,c=o(function(){return arguments}())?o:function(t){return i(t)&&a.call(t,"callee")&&!u.call(t,"callee")};t.exports=c},function(t,e,n){function o(t){return i(t)&&u.call(t)==r}var i=n(38),r="[object Arguments]",a=Object.prototype,u=a.toString;t.exports=o},function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){(function(t){var o=n(16),i=n(42),r="object"==typeof e&&e&&!e.nodeType&&e,a=r&&"object"==typeof t&&t&&!t.nodeType&&t,u=a&&a.exports===r,c=u?o.Buffer:void 0,l=c?c.isBuffer:void 0,s=l||i;t.exports=s}).call(e,n(41)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function n(){return!1}t.exports=n},function(t,e,n){var o=n(44),i=n(45),r=n(46),a=r&&r.isTypedArray,u=a?i(a):o;t.exports=u},function(t,e,n){function o(t){return r(t)&&i(t.length)&&!!P[D.call(t)]}var i=n(31),r=n(38),a="[object Arguments]",u="[object Array]",c="[object Boolean]",l="[object Date]",s="[object Error]",f="[object Function]",p="[object Map]",d="[object Number]",h="[object Object]",v="[object RegExp]",g="[object Set]",y="[object String]",b="[object WeakMap]",m="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",_="[object Float64Array]",j="[object Int8Array]",k="[object Int16Array]",O="[object Int32Array]",M="[object Uint8Array]",C="[object Uint8ClampedArray]",E="[object Uint16Array]",H="[object Uint32Array]",P={};P[w]=P[_]=P[j]=P[k]=P[O]=P[M]=P[C]=P[E]=P[H]=!0,P[a]=P[u]=P[m]=P[c]=P[x]=P[l]=P[s]=P[f]=P[p]=P[d]=P[h]=P[v]=P[g]=P[y]=P[b]=!1;var S=Object.prototype,D=S.toString;t.exports=o},function(t,e){function n(t){return function(e){return t(e)}}t.exports=n},function(t,e,n){(function(t){var o=n(17),i="object"==typeof e&&e&&!e.nodeType&&e,r=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=r&&r.exports===i,u=a&&o.process,c=function(){try{return u&&u.binding("util")}catch(t){}}();t.exports=c}).call(e,n(41)(t))},function(t,e,n){function o(t){if(!i(t))return a(t);var e=r(t),n=[];for(var o in t)("constructor"!=o||!e&&c.call(t,o))&&n.push(o);return n}var i=n(13),r=n(48),a=n(49),u=Object.prototype,c=u.hasOwnProperty;t.exports=o},function(t,e){function n(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||o;return t===n}var o=Object.prototype;t.exports=n},function(t,e){function n(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}t.exports=n},function(t,e,n){var o=n(24),i=n(21),r=n(51),a=i(function(t,e){try{return o(t,void 0,e)}catch(t){return r(t)?t:new Error(t)}});t.exports=a},function(t,e,n){function o(t){return!!i(t)&&(u.call(t)==r||"string"==typeof t.message&&"string"==typeof t.name)}var i=n(38),r="[object Error]",a=Object.prototype,u=a.toString;t.exports=o},function(t,e,n){function o(t,e){return i(e,function(e){return t[e]})}var i=n(53);t.exports=o},function(t,e){function n(t,e){for(var n=-1,o=t?t.length:0,i=Array(o);++n<o;)i[n]=e(t[n],n,t);return i}t.exports=n},function(t,e){function n(t){return"\\"+o[t]}var o={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};t.exports=n},function(t,e,n){function o(t){return a(t)?i(t):r(t)}var i=n(34),r=n(56),a=n(30);t.exports=o},function(t,e,n){function o(t){if(!i(t))return r(t);var e=[];for(var n in Object(t))u.call(t,n)&&"constructor"!=n&&e.push(n);return e}var i=n(48),r=n(57),a=Object.prototype,u=a.hasOwnProperty;t.exports=o},function(t,e,n){var o=n(58),i=o(Object.keys,Object);t.exports=i},function(t,e){function n(t,e){return function(n){return t(e(n))}}t.exports=n},function(t,e){var n=/<%=([\s\S]+?)%>/g;t.exports=n},function(t,e,n){var o=n(61),i=n(68),r=n(69),a=n(59),u={escape:i,evaluate:r,interpolate:a,variable:"",imports:{_:{escape:o}}};t.exports=u},function(t,e,n){function o(t){return t=r(t),t&&u.test(t)?t.replace(a,i):t}var i=n(62),r=n(64),a=/[&<>"']/g,u=RegExp(a.source);t.exports=o},function(t,e,n){var o=n(63),i={"&":"&","<":"<",">":">",'"':""","'":"'"},r=o(i);t.exports=r},function(t,e){function n(t){return function(e){return null==t?void 0:t[e]}}t.exports=n},function(t,e,n){function o(t){return null==t?"":i(t)}var i=n(65);t.exports=o},function(t,e,n){function o(t){if("string"==typeof t)return t;if(a(t))return r(t,o)+"";if(u(t))return s?s.call(t):"";var e=t+"";return"0"==e&&1/t==-c?"-0":e}var i=n(66),r=n(53),a=n(39),u=n(67),c=1/0,l=i?i.prototype:void 0,s=l?l.toString:void 0;t.exports=o},function(t,e,n){var o=n(16),i=o.Symbol;t.exports=i},function(t,e,n){function o(t){return"symbol"==typeof t||i(t)&&u.call(t)==r}var i=n(38),r="[object Symbol]",a=Object.prototype,u=a.toString;t.exports=o},function(t,e){var n=/<%-([\s\S]+?)%>/g;t.exports=n},function(t,e){var n=/<%([\s\S]+?)%>/g;t.exports=n},function(t,e,n){t.exports=n(71)},function(t,e,n){var o=n(6),i=n(20),r=n(33),a=i(function(t,e){o(e,r(e),t)});t.exports=a},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={minWidth:420,minHeight:170,maxWidth:920,maxHeight:580,hdHeight:45,ftHeight:30,padding:16,closeIconClass:"iconfont icon-shanchu5",boundary:function(t){var e=t.offsetWidth,n=t.offsetHeight;return{getLeft:function(t){var n=document.documentElement.clientWidth;return t<e/2?e/2:t>n-e/2?n-e/2:t},getTop:function(t){var e=document.documentElement.clientHeight;return t<n/2?n/2:t>e-n/2?e-n/2:t}}}}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={getCss:function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,!1)[e]},addClass:function(t,e){t.classList.add(e)},getAttr:function(t){return t.getBoundingClientRect()},getPoint:function(t){for(var e=t.offsetTop,n=t.offsetLeft;t=t.offsetParent;)e+=t.offsetTop,n+=t.offsetLeft;return{top:e,left:n}},has:function(t,e){1==arguments.length&&(t=document,e=arguments[0]);var n=t.querySelectorAll(e);return{length:n.length}},find:function(t,e){return 1==arguments.length&&(t=document,e=arguments[0]),t.querySelector(e)},appendHTML:function(t,e){var n=document.createElement("div");n.innerHTML=e;var o=n.childNodes[0];return t.appendChild(o),o},prependHTML:function(t,e){var n=document.createElement("div");n.innerHTML=e;var o=n.childNodes[0];return t.insertBefore(o,t.firstChild),o},remove:function(t){return t.parentNode&&t.parentNode.removeChild(t),t}}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=[].slice,a=function(){function t(){n(this,t)}return i(t,[{key:"$on",value:function(t,e){if("object"===("undefined"==typeof t?"undefined":o(t)))for(var n in t)this.$on(n,t[n]);else{var i=this,r=i._handles||(i._handles={}),a=r[t]||(r[t]=[]);a.push(e)}return this}},{key:"$off",value:function(t,e){var n=this;if(n._handles){t||(this._handles={});var o,i=n._handles;if(o=i[t]){if(!e)return i[t]=[],n;for(var r=0,a=o.length;r<a;r++)if(e===o[r])return o.splice(r,1),n}return n}}},{key:"$emit",value:function(t){var e,n,o,i=this,a=i._handles;if(t){var n=r.call(arguments,1),o=t;if(!a)return i;if(e=a[o.slice(1)])for(var u=0,c=e.length;u<c;u++)e[u].apply(i,n);if(!(e=a[o]))return i;for(var l=0,c=e.length;l<c;l++)e[l].apply(i,n);return i}}}]),t}();e.default=a},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(73),r=o(i),a=r.default.getCss,u={left:0,top:0,currentX:0,currentY:0,flag:!1};e.default={startDrag:function(t,e,n,o){"auto"!==a(e,"left")&&(u.left=a(e,"left")),"auto"!==a(e,"top")&&(u.top=a(e,"top")),t.onmousedown=function(i){o&&o.$emit("dragStart"),u.flag=!0,i||(i=window.event,t.onselectstart=function(){return!1});var r=i;u.currentX=r.clientX,u.currentY=r.clientY,document.onmouseup=function(){u.flag=!1,"auto"!==a(e,"left")&&(u.left=a(e,"left")),"auto"!==a(e,"top")&&(u.top=a(e,"top")),o&&o.$emit("dragEnd"),document.onmousemove=null,document.onmouseup=null},document.onmousemove=function(t){var o=t?t:window.event;if(u.flag){var i=o.clientX,r=o.clientY,a=i-u.currentX,c=r-u.currentY,l=parseInt(u.left)+a,s=parseInt(u.top)+c;n&&(l=n.getLeft(l),s=n.getTop(s)),e.style.left=l+"px",e.style.top=s+"px"}}}}}},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n,o,i){function r(){return(new Date).getTime()}"undefined"==typeof n&&(n=400,o="linear"),"string"==typeof n?("function"==typeof o&&(i=o),o=n,n=400):"function"==typeof n?(i=n,n=400,o="linear"):"number"==typeof n&&("function"==typeof o?(i=o,o="linear"):"undefined"==typeof o&&(o="linear"));var a={};for(var l in e)a[l]=0,"opacity"==l?a[l]=Math.round(100*u(t,l)):a[l]=parseInt(u(t,l));var s=r();clearInterval(t.timer),t.timer=setInterval(function(){var u=r(),l=n-Math.max(0,s-u+n);for(var f in e){var p=c[o](l,a[f],e[f]-a[f],n);"opacity"==f?(t.style.opacity=p/100,t.style.filter="alpha(opacity="+p+")"):t.style[f]=p+"px"}l==n&&(clearInterval(t.timer),i&&i.call(t))},13)}Object.defineProperty(e,"__esModule",{value:!0});var r=n(73),a=o(r),u=a.default.getCss,c={linear:function(t,e,n,o){return n*t/o+e},easeIn:function(t,e,n,o){return n*(t/=o)*t+e},easeOut:function(t,e,n,o){return-n*(t/=o)*(t-2)+e},easeBoth:function(t,e,n,o){return(t/=o/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},easeInStrong:function(t,e,n,o){return n*(t/=o)*t*t*t+e},easeOutStrong:function(t,e,n,o){return-n*((t=t/o-1)*t*t*t-1)+e},easeBothStrong:function(t,e,n,o){return(t/=o/2)<1?n/2*t*t*t*t+e:-n/2*((t-=2)*t*t*t-2)+e},elasticIn:function(t,e,n,o,i,r){if(0===t)return e;if(1==(t/=o))return e+n;if(r||(r=.3*o),!i||i<Math.abs(n)){i=n;var a=r/4}else var a=r/(2*Math.PI)*Math.asin(n/i);return-(i*Math.pow(2,10*(t-=1))*Math.sin((t*o-a)*(2*Math.PI)/r))+e},elasticOut:function(t,e,n,o,i,r){if(0===t)return e;if(1==(t/=o))return e+n;if(r||(r=.3*o),!i||i<Math.abs(n)){i=n;var a=r/4}else var a=r/(2*Math.PI)*Math.asin(n/i);return i*Math.pow(2,-10*t)*Math.sin((t*o-a)*(2*Math.PI)/r)+n+e},elasticBoth:function(t,e,n,o,i,r){if(0===t)return e;if(2==(t/=o/2))return e+n;if(r||(r=o*(.3*1.5)),!i||i<Math.abs(n)){i=n;var a=r/4}else var a=r/(2*Math.PI)*Math.asin(n/i);return t<1?-.5*(i*Math.pow(2,10*(t-=1))*Math.sin((t*o-a)*(2*Math.PI)/r))+e:i*Math.pow(2,-10*(t-=1))*Math.sin((t*o-a)*(2*Math.PI)/r)*.5+n+e},backIn:function(t,e,n,o,i){return"undefined"==typeof i&&(i=1.70158),n*(t/=o)*t*((i+1)*t-i)+e},backOut:function(t,e,n,o,i){return"undefined"==typeof i&&(i=3.70158),n*((t=t/o-1)*t*((i+1)*t+i)+1)+e},backBoth:function(t,e,n,o,i){return"undefined"==typeof i&&(i=1.70158),(t/=o/2)<1?n/2*(t*t*(((i*=1.525)+1)*t-i))+e:n/2*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)+e},bounceIn:function(t,e,n,o){return n-c.bounceOut(o-t,0,n,o)+e},bounceOut:function(t,e,n,o){return(t/=o)<1/2.75?n*(7.5625*t*t)+e:t<2/2.75?n*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?n*(7.5625*(t-=2.25/2.75)*t+.9375)+e:n*(7.5625*(t-=2.625/2.75)*t+.984375)+e},bounceBoth:function(t,e,n,o){return t<o/2?.5*c.bounceIn(2*t,0,n,o)+e:.5*c.bounceOut(2*t-o,0,n,o)+.5*n+e}};e.default={startMove:i}},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=n(2),l=o(c),s=n(70),f=o(s),p=n(78),d=o(p),h=n(73),v=o(h),g=n(74),y=o(g),b=n(76);o(b);e.default=function(){var t=['<div class="dui-tip-hint <%= tipClass %>" style="margin-top: <%=marginTop %>px; top: <%=top %>px; min-width: <%=minWidth %>px; max-width: <%=maxWidth %>px;">','<i class="<%= iconClass %>"></i>',"<p><%= msg %></p>","</div>"],e=['<div class="dui-tip-text" style="opacity: 0;">',"<p><%= msg %></p>",'<div class="close-box">','<button class="dui-btn-warning-bordered dui-btn-special dui-btn-small">我知道了</button>',"</div>","</div>"],n=['<div style="position: absolute; opacity: 0" class="<%= tipType %> <%= tipClass %>">',"<%= msg %>","</div>"],o=function(t){function e(t){i(this,e);var n=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this)),o={tipContent:"这是一段提示"};return n.option=t,n.option=(0,f.default)({},o,n.option),n.init(),n}return a(e,t),u(e,[{key:"init",value:function(){this.show(),this.option.init&&this.option.init.apply(this)}},{key:"show",value:function(){this.tipDom?this.tipDom.style.display="block":this.tipDom=v.default.appendHTML(document.body,this.option.tipContent)}},{key:"hide",value:function(){this.tipDom.style.display="none"}},{key:"destroy",value:function(){this.$emit("destroy"),v.default.remove(this.tipDom),this.tipDom=null}}]),e}(y.default);return o.showHint=function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){};v.default.has(".dui-tip-hint").length>0&&v.default.remove(v.default.find(".dui-tip-hint"));var u,c,s={tipClass:d.default.tipClassMap[e],marginTop:d.default.hint.marginTop,minWidth:d.default.hint.minWidth,maxWidth:d.default.hint.maxWidth,iconClass:d.default.hint.iconClass[e],msg:n};c=d.default.hint.pos[i],"%"==String(c).slice(-1)&&(c=Math.floor(d.default.hint.pos.rel.offsetHeight*(c.slice(0,-1)/100))),u=c-d.default.hint.pos.dis,s.top=u;var f=(0,l.default)(t.join("")),p=f(s);return new o({tipContent:p,init:function(){var t=this;this.tipDom.style.display="block",setTimeout(function(){Dui.Animate.startMove(t.tipDom,{top:c},function(){setTimeout(function(){Dui.Animate.startMove(t.tipDom,{top:u},function(){a&&a.apply(t),t.tipDom.style.display="none",t.destroy()})},1e3*r)})},10)}})},o.successInfo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("success",t,"top",e,n)},o.middleSuccessInfo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("success",t,"middle",e,n)},o.warning=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("warn",t,"top",e,n)},o.middleWarning=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("warn",t,"middle",e,n)},o.otherInfo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("other",t,"top",e,n)},o.middleOtherInfo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("other",t,"middle",e,n)},o.info=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("info",t,"top",e,n)},o.middleInfo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("info",t,"middle",e,n)},o.error=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("error",t,"top",e,n)},o.middleError=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("error",t,"middle",e,n)},o.showUpdateMessage=function(t){function n(t){var e=v.default.find(t,"button");e.onclick=function(){Dui.Animate.startMove(t,{opacity:0},400,function(){e.onclick=null,v.default.remove(t);var n=v.default.find(".dui-update-message");0==v.default.has(n,".dui-tip-text").length&&v.default.remove(n)})}}var i={msg:t},r=(0,l.default)(e.join("")),a=r(i);0==v.default.has(".dui-update-message").length?(a='<div style="top: '+d.default.updateMessage.top+'" class="dui-update-message">'+a+"</div>",new o({tipContent:a,init:function(){var t=v.default.find(this.tipDom,".dui-tip-text");Dui.Animate.startMove(t,{opacity:100},400,function(){n(t)})}})):!function(){var t=v.default.find(".dui-update-message"),e=v.default.prependHTML(t,a);Dui.Animate.startMove(e,{opacity:100},400,function(){n(e)})}()},o._showBasicArrow=function(t){if(!t.pos)return void console.error("必须传pos字段,来表明箭头的位置");if(!t.alignElem)return void console.error("必须传alignElem,来决定Tip的显示位置");t.tipClass=d.default.tipArrowClassMap[t.pos],t.type=t.type||"default",t.tipType="error"==t.type?"dui-tip-error-arrow":"dui-tip-arrow";var e=(0,l.default)(n.join("")),i=e(t);return console.log(i),new o({tipContent:i,init:function(){var e=v.default.getAttr(this.tipDom),n=v.default.getAttr(t.alignElem),o=v.default.getPoint(t.alignElem),i="position: absolute";switch(t.pos){case"l":i+="; top: "+o.top+"px",i+="; left: "+(o.left-e.width-d.default.arrowSize-t.spacing)+"px";break;case"r":i+="; top: "+o.top+"px",i+="; left: "+(o.left+n.width+d.default.arrowSize+t.spacing)+"px";break;case"t":i+="; top: "+(o.top-e.height-d.default.arrowSize-t.spacing)+"px",i+="; left: "+(o.left+n.width/2-e.width/2)+"px";break;case"b":i+="; top: "+(o.top+n.height+d.default.arrowSize+t.spacing)+"px",i+="; left: "+(n.left+n.width/2-e.width/2)+"px";break;case"bl":i+="; top: "+(o.top+n.height+d.default.arrowSize+t.spacing)+"px", | ||
i+="; left: "+o.left+"px";break;case"br":i+="; top: "+(o.top+n.height+d.default.arrowSize+t.spacing)+"px",i+="; left: "+(o.left+n.width-e.width)+"px"}i+="; display: none; opacity: 1",this.tipDom.style.cssText=i}})},o.tooltip=function(t){function e(){o&&o.show()}function n(){o&&o.hide()}if(!t.el)return void console.error("必须传入el");if(!t.msg)return void console.error("必须传msg");var o=void 0,i="string"==typeof t.el?v.default.find(t.el):t.el;return o=Dui.Tip._showBasicArrow({msg:t.msg,pos:t.pos,alignElem:i,spacing:t.spacing||5}).$on("destroy",function(){i.removeEventListener("mouseover",e),i.removeEventListener("mouseout",n)}),i.addEventListener("mouseover",e),i.addEventListener("mouseout",n),o},o.showFormError=function(t){if(!t.el)return void console.error("必须传入el");if(!t.msg)return void console.error("必须传msg");var e=void 0,n="string"==typeof t.el?v.default.find(t.el):t.el;return e=Dui.Tip._showBasicArrow({type:"error",msg:t.msg,pos:t.pos,alignElem:n,spacing:t.spacing||5})},o}()},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={hint:{marginTop:8,minWidth:250,maxWidth:362,iconClass:{warn:"iconfont icon-tishi-20160921",info:"iconfont icon-yunxingyichangtishi-20150921",error:"iconfont icon-cuowu-20160921",success:"iconfont icon-right-2016-0921",other:"iconfont icon-tishi-20160921"},pos:{rel:document.documentElement,top:"0",middle:"35%",dis:50}},tipClassMap:{success:"dui-tip-success",info:"dui-tip-info",warn:"dui-tip-warning",error:"dui-tip-error",other:"dui-tip"},updateMessage:{top:"2%"},arrowSize:5,tipArrowClassMap:{l:"dui-tip-right-arrow",r:"dui-tip-left-arrow",t:"dui-tip-bottom-arrow",b:"dui-tip-top-arrow",bl:"dui-tip-top-left-arrow",br:"dui-tip-top-right-arrow"}}}]); | ||
!function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var i=n(1),r=o(i),a=n(76),u=o(a),c=n(77),s=o(c);window.Dui=t.exports={Modal:r.default,Animate:u.default,Tip:s.default}},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=n(2),s=o(c),l=n(70),f=o(l),p=n(72),d=o(p),h=n(73),v=o(h),g=n(74),y=o(g),m=n(75),b=o(m);e.default=function(){var t=['<div class="dui-dialog <%= className %>" style="width: <%= width %>px; height: <%= height %>px; z-index: <%= zIndex %>">',"<% if(close) { %>",'<i class="dui-dialog-close J_dialog-close <%=closeClass %>" href="javascript:;"></i>',"<% } %>",'<% if(title != "" && type == "default") { %>','<div class="dui-dialog-hd">','<% if(titleIconClass == "") { %>','<h3 class="dui-dialog-title"><%= title %></h3>',"<% }else { %>",'<h3 class="dui-dialog-title has-icon"><i class="<%= titleIconClass %>"></i><%= title %></h3>',"<% } %>","</div>","<% } %>",'<% if(title == "" && type == "default") { %>','<div style="height: 14px;"></div>',"<% } %>",'<% if(type == "custom") { %>','<div class="dui-dialog-custom-bd"><%= content %></div>',"<% } %>",'<% if(type == "default") { %>','<% if(contentHeight != "auto"){ %>','<div style="height: <%= contentHeight %>px;" class="dui-dialog-bd">',"<% }else { %>",'<div style="height: <%= contentHeight %>;max-height: <%= contentMaxHeight %>px" class="dui-dialog-bd">',"<% } %>","<%= content %>","</div>","<% if(ok || cancel) { %>",'<div class="dui-dialog-ft <%= btnPosClass %>">','<div class="dui-btn-list-g10">',"<% if(ok) { %>",'<a class="dui-btn-info J_dialog-ok" href="javascript:;"><%= okValue %></a>',"<% } %>","<% if(cancel) { %>",'<a class="dui-btn J_dialog-cancel" href="javascript:;"><%= cancelValue %></a>',"<% } %>","</div>","</div>","<% } %>","<% } %>","</div>"],e=function(e){function n(t){i(this,n);var e=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this)),o={type:"default",title:"提示",content:"内容",okValue:"确定",cancelValue:"取消",className:"",zIndex:9999,titleIconClass:"",closeClass:d.default.closeIconClass,mask:!0,close:!0,ok:!1,cancel:!1,btnPos:"right",draggable:!1};return e.option=t,e.option=(0,f.default)({},o,e.option),e.init(),e}return a(n,e),u(n,[{key:"init",value:function(){this.handleOption(),this.show(),this.bindEvent(),this.handleDrag(),this.option.init&&this.option.init.apply(this)}},{key:"handleOption",value:function(){this.handleOptionWidth(),this.handleOptionHeight(),this.handleOptionButton(),this.handleOptionContentHeight()}},{key:"handleOptionWidth",value:function(){var t=this.option.width;t=t?parseInt(t):d.default.minWidth,d.default.minWidth-t>=0&&(t=d.default.minWidth),d.default.maxWidth-t<0&&(t=d.default.maxWidth),this.option.width=t}},{key:"handleOptionHeight",value:function(){var t=this.option.height;"auto"!=t&&(t=t?parseInt(t):d.default.minHeight,d.default.minHeight-t>=0&&(t=d.default.minHeight),d.default.maxHeight-t<0&&(t=d.default.maxHeight),this.option.height=t)}},{key:"handleOptionContentHeight",value:function(){var t=this.option.height,e=d.default.hdHeight,n=d.default.ftHeight,o=d.default.padding,i=d.default.maxHeight,r=void 0;if(this.option.ok||this.option.cancel?r=3*o:(r=2*o,n=0),""==this.option.title&&(e=14),"auto"==t){this.option.contentHeight="auto";var a=i-e-n-r;this.option.contentMaxHeight=a}else{var u=t-e-n-r;this.option.contentHeight=u}}},{key:"handleOptionButton",value:function(){var t=this.option.ok,e=this.option.cancel;if(null==t)this.option.ok=!1;else{var n="boolean"==typeof t;this.option.ok=!!t,this.option.okValue=n?this.option.okValue:t}if(null==e)this.option.ok=!1;else{var n="boolean"==typeof t;this.option.cancel=!!e,this.option.cancelValue=n?this.option.cancelValue:e}this.option.okFn&&(this.option.ok=!0),this.option.cancelFn&&(this.option.cancel=!0),this.option.btnPosClass="dui-dialog-ft-"+this.option.btnPos}},{key:"show",value:function(){var e=v.default.has(".dui-dialog-wrap").length;if(0==e&&this.option.mask){var n='<div class="dui-dialog-wrap" style="z-index: '+this.option.zIndex+'"></div>';v.default.appendHTML(document.body,n)}var o=(0,s.default)(t.join("")),i=o(this.option);this.option.mask?this.dialogDom=v.default.appendHTML(v.default.find(".dui-dialog-wrap"),i):this.dialogDom=v.default.appendHTML(document.body,i)}},{key:"hide",value:function(){this.$emit("destroy"),this.destroy()}},{key:"destroy",value:function(){this.unBindEvent();var t;t=this.option.mask?v.default.has(v.default.find(".dui-dialog-wrap"),".dui-dialog").length:v.default.has(".dui-dialog").length,v.default.remove(this.dialogDom),1==t&&this.option.mask&&v.default.remove(v.default.find(".dui-dialog-wrap")),this.dialogDom=null}},{key:"_okFn",value:function(){this.$emit("ok"),this.option.okFn&&this.option.okFn.apply(this)}},{key:"_cancelFn",value:function(){this.$emit("cancel"),this.option.cancelFn&&this.option.cancelFn.apply(this),this.hide()}},{key:"_closeFn",value:function(){this.$emit("close"),this.hide()}},{key:"_escFn",value:function(t){t=t||window.event,"27"==t.keyCode&&this.hide()}},{key:"handleDrag",value:function(){if(this.option.draggable){var t=v.default.find(this.dialogDom,".dui-dialog-hd");v.default.addClass(t,"z-draggable"),b.default.startDrag(t,this.dialogDom,d.default.boundary(this.dialogDom),this)}}},{key:"bindEvent",value:function(){var t=this.okBtn=v.default.find(this.dialogDom,".J_dialog-ok"),e=this.cancelBtn=v.default.find(this.dialogDom,".J_dialog-cancel"),n=this.closeBtn=v.default.find(this.dialogDom,".J_dialog-close");t&&t.addEventListener("click",this.bindOkClick=this._okFn.bind(this),!1),e&&e.addEventListener("click",this.bindCancelClick=this._cancelFn.bind(this),!1),n&&n.addEventListener("click",this.bindCloseClick=this._closeFn.bind(this),!1),document.addEventListener("keydown",this.bindEscClick=this._escFn.bind(this),!1)}},{key:"unBindEvent",value:function(){var t=this.okBtn,e=this.cancelBtn,n=this.closeBtn;t&&t.removeEventListener("click",this.bindOkClick,!1),e&&e.removeEventListener("click",this.bindCancelClick,!1),n&&n.removeEventListener("click",this.bindCloseClick,!1),document.removeEventListener("keydown",this.bindEscClick,!1)}}]),n}(y.default);return e.alert=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"提示",o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return new e({title:n,content:t,close:o,okFn:function(){this.hide()}})},e.confirm=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"提示";return new Promise(function(o){new e({title:n,content:t,okFn:function(){o(),this.hide()},cancel:!0})})},e}()},function(t,e,n){function o(t,e,n){var o=d.imports._.templateSettings||d;n&&l(t,e,n)&&(e=void 0),t=h(t),e=r({},e,o,i);var w,_,j=r({},e.imports,o.imports,i),k=f(j),O=u(j,k),M=0,E=e.interpolate||b,C="__p += '",H=RegExp((e.escape||b).source+"|"+E.source+"|"+(E===p?m:b).source+"|"+(e.evaluate||b).source+"|$","g"),P="sourceURL"in e?"//# sourceURL="+e.sourceURL+"\n":"";t.replace(H,function(e,n,o,i,r,a){return o||(o=i),C+=t.slice(M,a).replace(x,c),n&&(w=!0,C+="' +\n__e("+n+") +\n'"),r&&(_=!0,C+="';\n"+r+";\n__p += '"),o&&(C+="' +\n((__t = ("+o+")) == null ? '' : __t) +\n'"),M=a+e.length,e}),C+="';\n";var D=e.variable;D||(C="with (obj) {\n"+C+"\n}\n"),C=(_?C.replace(v,""):C).replace(g,"$1").replace(y,"$1;"),C="function("+(D||"obj")+") {\n"+(D?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(w?", __e = _.escape":"")+(_?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+C+"return __p\n}";var S=a(function(){return Function(k,P+"return "+C).apply(void 0,O)});if(S.source=C,s(S))throw S;return S}var i=n(3),r=n(5),a=n(50),u=n(52),c=n(54),s=n(51),l=n(29),f=n(55),p=n(59),d=n(60),h=n(64),v=/\b__p \+= '';/g,g=/\b(__p \+=) '' \+/g,y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,m=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,b=/($^)/,x=/['\n\r\u2028\u2029\\]/g;t.exports=o},function(t,e,n){function o(t,e,n,o){return void 0===t||i(t,r[n])&&!a.call(o,n)?e:t}var i=n(4),r=Object.prototype,a=r.hasOwnProperty;t.exports=o},function(t,e){function n(t,e){return t===e||t!==t&&e!==e}t.exports=n},function(t,e,n){var o=n(6),i=n(20),r=n(33),a=i(function(t,e,n,i){o(e,r(e),t,i)});t.exports=a},function(t,e,n){function o(t,e,n,o){var a=!n;n||(n={});for(var u=-1,c=e.length;++u<c;){var s=e[u],l=o?o(n[s],t[s],s,n,t):void 0;void 0===l&&(l=t[s]),a?r(n,s,l):i(n,s,l)}return n}var i=n(7),r=n(8);t.exports=o},function(t,e,n){function o(t,e,n){var o=t[e];u.call(t,e)&&r(o,n)&&(void 0!==n||e in t)||i(t,e,n)}var i=n(8),r=n(4),a=Object.prototype,u=a.hasOwnProperty;t.exports=o},function(t,e,n){function o(t,e,n){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var i=n(9);t.exports=o},function(t,e,n){var o=n(10),i=function(){try{var t=o(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){function o(t,e){var n=r(t,e);return i(n)?n:void 0}var i=n(11),r=n(19);t.exports=o},function(t,e,n){function o(t){if(!a(t)||r(t))return!1;var e=i(t)?h:s;return e.test(u(t))}var i=n(12),r=n(14),a=n(13),u=n(18),c=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,p=l.toString,d=f.hasOwnProperty,h=RegExp("^"+p.call(d).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=o},function(t,e,n){function o(t){var e=i(t)?s.call(t):"";return e==r||e==a||e==u}var i=n(13),r="[object Function]",a="[object GeneratorFunction]",u="[object Proxy]",c=Object.prototype,s=c.toString;t.exports=o},function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){function o(t){return!!r&&r in t}var i=n(15),r=function(){var t=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=o},function(t,e,n){var o=n(16),i=o["__core-js_shared__"];t.exports=i},function(t,e,n){var o=n(17),i="object"==typeof self&&self&&self.Object===Object&&self,r=o||i||Function("return this")();t.exports=r},function(t,e){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(e,function(){return this}())},function(t,e){function n(t){if(null!=t){try{return i.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var o=Function.prototype,i=o.toString;t.exports=n},function(t,e){function n(t,e){return null==t?void 0:t[e]}t.exports=n},function(t,e,n){function o(t){return i(function(e,n){var o=-1,i=n.length,a=i>1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,u&&r(n[0],n[1],u)&&(a=i<3?void 0:a,i=1),e=Object(e);++o<i;){var c=n[o];c&&t(e,c,o,a)}return e})}var i=n(21),r=n(29);t.exports=o},function(t,e,n){function o(t,e){return a(r(t,e,i),t+"")}var i=n(22),r=n(23),a=n(25);t.exports=o},function(t,e){function n(t){return t}t.exports=n},function(t,e,n){function o(t,e,n){return e=r(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,u=r(o.length-e,0),c=Array(u);++a<u;)c[a]=o[e+a];a=-1;for(var s=Array(e+1);++a<e;)s[a]=o[a];return s[e]=n(c),i(t,this,s)}}var i=n(24),r=Math.max;t.exports=o},function(t,e){function n(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}t.exports=n},function(t,e,n){var o=n(26),i=n(28),r=i(o);t.exports=r},function(t,e,n){var o=n(27),i=n(9),r=n(22),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:o(e),writable:!0})}:r;t.exports=a},function(t,e){function n(t){return function(){return t}}t.exports=n},function(t,e){function n(t){var e=0,n=0;return function(){var a=r(),u=i-(a-n);if(n=a,u>0){if(++e>=o)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var o=500,i=16,r=Date.now;t.exports=n},function(t,e,n){function o(t,e,n){if(!u(n))return!1;var o=typeof e;return!!("number"==o?r(n)&&a(e,n.length):"string"==o&&e in n)&&i(n[e],t)}var i=n(4),r=n(30),a=n(32),u=n(13);t.exports=o},function(t,e,n){function o(t){return null!=t&&r(t.length)&&!i(t)}var i=n(12),r=n(31);t.exports=o},function(t,e){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}var o=9007199254740991;t.exports=n},function(t,e){function n(t,e){return e=null==e?o:e,!!e&&("number"==typeof t||i.test(t))&&t>-1&&t%1==0&&t<e}var o=9007199254740991,i=/^(?:0|[1-9]\d*)$/;t.exports=n},function(t,e,n){function o(t){return a(t)?i(t,!0):r(t)}var i=n(34),r=n(47),a=n(30);t.exports=o},function(t,e,n){function o(t,e){var n=a(t),o=!n&&r(t),l=!n&&!o&&u(t),p=!n&&!o&&!l&&s(t),d=n||o||l||p,h=d?i(t.length,String):[],v=h.length;for(var g in t)!e&&!f.call(t,g)||d&&("length"==g||l&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||c(g,v))||h.push(g);return h}var i=n(35),r=n(36),a=n(39),u=n(40),c=n(32),s=n(43),l=Object.prototype,f=l.hasOwnProperty;t.exports=o},function(t,e){function n(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o}t.exports=n},function(t,e,n){var o=n(37),i=n(38),r=Object.prototype,a=r.hasOwnProperty,u=r.propertyIsEnumerable,c=o(function(){return arguments}())?o:function(t){return i(t)&&a.call(t,"callee")&&!u.call(t,"callee")};t.exports=c},function(t,e,n){function o(t){return i(t)&&u.call(t)==r}var i=n(38),r="[object Arguments]",a=Object.prototype,u=a.toString;t.exports=o},function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){(function(t){var o=n(16),i=n(42),r="object"==typeof e&&e&&!e.nodeType&&e,a=r&&"object"==typeof t&&t&&!t.nodeType&&t,u=a&&a.exports===r,c=u?o.Buffer:void 0,s=c?c.isBuffer:void 0,l=s||i;t.exports=l}).call(e,n(41)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function n(){return!1}t.exports=n},function(t,e,n){var o=n(44),i=n(45),r=n(46),a=r&&r.isTypedArray,u=a?i(a):o;t.exports=u},function(t,e,n){function o(t){return r(t)&&i(t.length)&&!!P[S.call(t)]}var i=n(31),r=n(38),a="[object Arguments]",u="[object Array]",c="[object Boolean]",s="[object Date]",l="[object Error]",f="[object Function]",p="[object Map]",d="[object Number]",h="[object Object]",v="[object RegExp]",g="[object Set]",y="[object String]",m="[object WeakMap]",b="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",_="[object Float64Array]",j="[object Int8Array]",k="[object Int16Array]",O="[object Int32Array]",M="[object Uint8Array]",E="[object Uint8ClampedArray]",C="[object Uint16Array]",H="[object Uint32Array]",P={};P[w]=P[_]=P[j]=P[k]=P[O]=P[M]=P[E]=P[C]=P[H]=!0,P[a]=P[u]=P[b]=P[c]=P[x]=P[s]=P[l]=P[f]=P[p]=P[d]=P[h]=P[v]=P[g]=P[y]=P[m]=!1;var D=Object.prototype,S=D.toString;t.exports=o},function(t,e){function n(t){return function(e){return t(e)}}t.exports=n},function(t,e,n){(function(t){var o=n(17),i="object"==typeof e&&e&&!e.nodeType&&e,r=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=r&&r.exports===i,u=a&&o.process,c=function(){try{return u&&u.binding("util")}catch(t){}}();t.exports=c}).call(e,n(41)(t))},function(t,e,n){function o(t){if(!i(t))return a(t);var e=r(t),n=[];for(var o in t)("constructor"!=o||!e&&c.call(t,o))&&n.push(o);return n}var i=n(13),r=n(48),a=n(49),u=Object.prototype,c=u.hasOwnProperty;t.exports=o},function(t,e){function n(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||o;return t===n}var o=Object.prototype;t.exports=n},function(t,e){function n(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}t.exports=n},function(t,e,n){var o=n(24),i=n(21),r=n(51),a=i(function(t,e){try{return o(t,void 0,e)}catch(t){return r(t)?t:new Error(t)}});t.exports=a},function(t,e,n){function o(t){return!!i(t)&&(u.call(t)==r||"string"==typeof t.message&&"string"==typeof t.name)}var i=n(38),r="[object Error]",a=Object.prototype,u=a.toString;t.exports=o},function(t,e,n){function o(t,e){return i(e,function(e){return t[e]})}var i=n(53);t.exports=o},function(t,e){function n(t,e){for(var n=-1,o=t?t.length:0,i=Array(o);++n<o;)i[n]=e(t[n],n,t);return i}t.exports=n},function(t,e){function n(t){return"\\"+o[t]}var o={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};t.exports=n},function(t,e,n){function o(t){return a(t)?i(t):r(t)}var i=n(34),r=n(56),a=n(30);t.exports=o},function(t,e,n){function o(t){if(!i(t))return r(t);var e=[];for(var n in Object(t))u.call(t,n)&&"constructor"!=n&&e.push(n);return e}var i=n(48),r=n(57),a=Object.prototype,u=a.hasOwnProperty;t.exports=o},function(t,e,n){var o=n(58),i=o(Object.keys,Object);t.exports=i},function(t,e){function n(t,e){return function(n){return t(e(n))}}t.exports=n},function(t,e){var n=/<%=([\s\S]+?)%>/g;t.exports=n},function(t,e,n){var o=n(61),i=n(68),r=n(69),a=n(59),u={escape:i,evaluate:r,interpolate:a,variable:"",imports:{_:{escape:o}}};t.exports=u},function(t,e,n){function o(t){return t=r(t),t&&u.test(t)?t.replace(a,i):t}var i=n(62),r=n(64),a=/[&<>"']/g,u=RegExp(a.source);t.exports=o},function(t,e,n){var o=n(63),i={"&":"&","<":"<",">":">",'"':""","'":"'"},r=o(i);t.exports=r},function(t,e){function n(t){return function(e){return null==t?void 0:t[e]}}t.exports=n},function(t,e,n){function o(t){return null==t?"":i(t)}var i=n(65);t.exports=o},function(t,e,n){function o(t){if("string"==typeof t)return t;if(a(t))return r(t,o)+"";if(u(t))return l?l.call(t):"";var e=t+"";return"0"==e&&1/t==-c?"-0":e}var i=n(66),r=n(53),a=n(39),u=n(67),c=1/0,s=i?i.prototype:void 0,l=s?s.toString:void 0;t.exports=o},function(t,e,n){var o=n(16),i=o.Symbol;t.exports=i},function(t,e,n){function o(t){return"symbol"==typeof t||i(t)&&u.call(t)==r}var i=n(38),r="[object Symbol]",a=Object.prototype,u=a.toString;t.exports=o},function(t,e){var n=/<%-([\s\S]+?)%>/g;t.exports=n},function(t,e){var n=/<%([\s\S]+?)%>/g;t.exports=n},function(t,e,n){t.exports=n(71)},function(t,e,n){var o=n(6),i=n(20),r=n(33),a=i(function(t,e){o(e,r(e),t)});t.exports=a},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={minWidth:420,minHeight:170,maxWidth:920,maxHeight:580,hdHeight:45,ftHeight:30,padding:16,closeIconClass:"iconfont icon-shanchu5",boundary:function(t){var e=t.offsetWidth,n=t.offsetHeight;return{getLeft:function(t){var n=document.documentElement.clientWidth;return t<e/2?e/2:t>n-e/2?n-e/2:t},getTop:function(t){var e=document.documentElement.clientHeight;return t<n/2?n/2:t>e-n/2?e-n/2:t}}}}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={getCss:function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,!1)[e]},addClass:function(t,e){t.classList.add(e)},getAttr:function(t){return t.getBoundingClientRect()},getPoint:function(t){for(var e=t.offsetTop,n=t.offsetLeft;t=t.offsetParent;)e+=t.offsetTop,n+=t.offsetLeft;return{top:e,left:n}},has:function(t,e){1==arguments.length&&(t=document,e=arguments[0]);var n=t.querySelectorAll(e);return{length:n.length}},find:function(t,e){return 1==arguments.length&&(t=document,e=arguments[0]),t.querySelector(e)},appendHTML:function(t,e){var n=document.createElement("div");n.innerHTML=e;var o=n.childNodes[0];return t.appendChild(o),o},prependHTML:function(t,e){var n=document.createElement("div");n.innerHTML=e;var o=n.childNodes[0];return t.insertBefore(o,t.firstChild),o},remove:function(t){return t.parentNode&&t.parentNode.removeChild(t),t}}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=[].slice,a=function(){function t(){n(this,t)}return i(t,[{key:"$on",value:function(t,e){if("object"===("undefined"==typeof t?"undefined":o(t)))for(var n in t)this.$on(n,t[n]);else{var i=this,r=i._handles||(i._handles={}),a=r[t]||(r[t]=[]);a.push(e)}return this}},{key:"$off",value:function(t,e){var n=this;if(n._handles){t||(this._handles={});var o,i=n._handles;if(o=i[t]){if(!e)return i[t]=[],n;for(var r=0,a=o.length;r<a;r++)if(e===o[r])return o.splice(r,1),n}return n}}},{key:"$emit",value:function(t){var e,n,o,i=this,a=i._handles;if(t){var n=r.call(arguments,1),o=t;if(!a)return i;if(e=a[o.slice(1)])for(var u=0,c=e.length;u<c;u++)e[u].apply(i,n);if(!(e=a[o]))return i;for(var s=0,c=e.length;s<c;s++)e[s].apply(i,n);return i}}}]),t}();e.default=a},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(73),r=o(i),a=r.default.getCss,u={left:0,top:0,currentX:0,currentY:0,flag:!1};e.default={startDrag:function(t,e,n,o){"auto"!==a(e,"left")&&(u.left=a(e,"left")),"auto"!==a(e,"top")&&(u.top=a(e,"top")),t.onmousedown=function(i){o&&o.$emit("dragStart"),u.flag=!0,i||(i=window.event,t.onselectstart=function(){return!1});var r=i;u.currentX=r.clientX,u.currentY=r.clientY,document.onmouseup=function(){u.flag=!1,"auto"!==a(e,"left")&&(u.left=a(e,"left")),"auto"!==a(e,"top")&&(u.top=a(e,"top")),o&&o.$emit("dragEnd"),document.onmousemove=null,document.onmouseup=null},document.onmousemove=function(t){var o=t?t:window.event;if(u.flag){var i=o.clientX,r=o.clientY,a=i-u.currentX,c=r-u.currentY,s=parseInt(u.left)+a,l=parseInt(u.top)+c;n&&(s=n.getLeft(s),l=n.getTop(l)),e.style.left=s+"px",e.style.top=l+"px"}}}}}},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n,o,i){function r(){return(new Date).getTime()}"undefined"==typeof n&&(n=400,o="linear"),"string"==typeof n?("function"==typeof o&&(i=o),o=n,n=400):"function"==typeof n?(i=n,n=400,o="linear"):"number"==typeof n&&("function"==typeof o?(i=o,o="linear"):"undefined"==typeof o&&(o="linear"));var a={};for(var s in e)a[s]=0,"opacity"==s?a[s]=Math.round(100*u(t,s)):a[s]=parseInt(u(t,s));var l=r();clearInterval(t.timer),t.timer=setInterval(function(){var u=r(),s=n-Math.max(0,l-u+n);for(var f in e){var p=c[o](s,a[f],e[f]-a[f],n);"opacity"==f?(t.style.opacity=p/100,t.style.filter="alpha(opacity="+p+")"):t.style[f]=p+"px"}s==n&&(clearInterval(t.timer),i&&i.call(t))},13)}Object.defineProperty(e,"__esModule",{value:!0});var r=n(73),a=o(r),u=a.default.getCss,c={linear:function(t,e,n,o){return n*t/o+e},easeIn:function(t,e,n,o){return n*(t/=o)*t+e},easeOut:function(t,e,n,o){return-n*(t/=o)*(t-2)+e},easeBoth:function(t,e,n,o){return(t/=o/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},easeInStrong:function(t,e,n,o){return n*(t/=o)*t*t*t+e},easeOutStrong:function(t,e,n,o){return-n*((t=t/o-1)*t*t*t-1)+e},easeBothStrong:function(t,e,n,o){return(t/=o/2)<1?n/2*t*t*t*t+e:-n/2*((t-=2)*t*t*t-2)+e},elasticIn:function(t,e,n,o,i,r){if(0===t)return e;if(1==(t/=o))return e+n;if(r||(r=.3*o),!i||i<Math.abs(n)){i=n;var a=r/4}else var a=r/(2*Math.PI)*Math.asin(n/i);return-(i*Math.pow(2,10*(t-=1))*Math.sin((t*o-a)*(2*Math.PI)/r))+e},elasticOut:function(t,e,n,o,i,r){if(0===t)return e;if(1==(t/=o))return e+n;if(r||(r=.3*o),!i||i<Math.abs(n)){i=n;var a=r/4}else var a=r/(2*Math.PI)*Math.asin(n/i);return i*Math.pow(2,-10*t)*Math.sin((t*o-a)*(2*Math.PI)/r)+n+e},elasticBoth:function(t,e,n,o,i,r){if(0===t)return e;if(2==(t/=o/2))return e+n;if(r||(r=o*(.3*1.5)),!i||i<Math.abs(n)){i=n;var a=r/4}else var a=r/(2*Math.PI)*Math.asin(n/i);return t<1?-.5*(i*Math.pow(2,10*(t-=1))*Math.sin((t*o-a)*(2*Math.PI)/r))+e:i*Math.pow(2,-10*(t-=1))*Math.sin((t*o-a)*(2*Math.PI)/r)*.5+n+e},backIn:function(t,e,n,o,i){return"undefined"==typeof i&&(i=1.70158),n*(t/=o)*t*((i+1)*t-i)+e},backOut:function(t,e,n,o,i){return"undefined"==typeof i&&(i=3.70158),n*((t=t/o-1)*t*((i+1)*t+i)+1)+e},backBoth:function(t,e,n,o,i){return"undefined"==typeof i&&(i=1.70158),(t/=o/2)<1?n/2*(t*t*(((i*=1.525)+1)*t-i))+e:n/2*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)+e},bounceIn:function(t,e,n,o){return n-c.bounceOut(o-t,0,n,o)+e},bounceOut:function(t,e,n,o){return(t/=o)<1/2.75?n*(7.5625*t*t)+e:t<2/2.75?n*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?n*(7.5625*(t-=2.25/2.75)*t+.9375)+e:n*(7.5625*(t-=2.625/2.75)*t+.984375)+e},bounceBoth:function(t,e,n,o){return t<o/2?.5*c.bounceIn(2*t,0,n,o)+e:.5*c.bounceOut(2*t-o,0,n,o)+.5*n+e}};e.default={startMove:i}},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=n(2),s=o(c),l=n(70),f=o(l),p=n(78),d=o(p),h=n(73),v=o(h),g=n(74),y=o(g),m=n(76);o(m);e.default=function(){var t=['<div class="dui-tip-hint <%= tipClass %>" style="margin-top: <%=marginTop %>px; top: <%=top %>px; min-width: <%=minWidth %>px; max-width: <%=maxWidth %>px;">','<i class="<%= iconClass %>"></i>',"<p><%= msg %></p>","</div>"],e=['<div class="dui-tip-text" style="opacity: 0;">',"<p><%= msg %></p>",'<div class="close-box">','<button class="dui-btn-warning-bordered dui-btn-special dui-btn-small">我知道了</button>',"</div>","</div>"],n=['<div style="position: absolute; opacity: 0" class="<%= tipType %> <%= tipClass %>">',"<%= msg %>","</div>"],o=function(t){function e(t){i(this,e);var n=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this)),o={tipContent:"这是一段提示"};return n.option=t,n.option=(0,f.default)({},o,n.option),n.init(),n}return a(e,t),u(e,[{key:"init",value:function(){this.show(),this.option.init&&this.option.init.apply(this)}},{key:"show",value:function(){this.tipDom?this.tipDom.style.display="block":this.tipDom=v.default.appendHTML(document.body,this.option.tipContent)}},{key:"hide",value:function(){this.tipDom.style.display="none"}},{key:"destroy",value:function(t){this.$emit("destroy"),t&&t(),v.default.remove(this.tipDom),this.tipDom=null}}]),e}(y.default);return o.showHint=function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){};v.default.has(".dui-tip-hint").length>0&&v.default.remove(v.default.find(".dui-tip-hint"));var u,c,l={tipClass:d.default.tipClassMap[e],marginTop:d.default.hint.marginTop,minWidth:d.default.hint.minWidth,maxWidth:d.default.hint.maxWidth,iconClass:d.default.hint.iconClass[e],msg:n};c=d.default.hint.pos[i],"%"==String(c).slice(-1)&&(c=Math.floor(d.default.hint.pos.rel.offsetHeight*(c.slice(0,-1)/100))),u=c-d.default.hint.pos.dis,l.top=u;var f=(0,s.default)(t.join("")),p=f(l);return new o({tipContent:p,init:function(){var t=this;this.tipDom.style.display="block",setTimeout(function(){Dui.Animate.startMove(t.tipDom,{top:c},function(){setTimeout(function(){Dui.Animate.startMove(t.tipDom,{top:u},function(){a&&a.apply(t),t.tipDom.style.display="none",t.destroy()})},1e3*r)})},10)}})},o.successInfo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("success",t,"top",e,n)},o.middleSuccessInfo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("success",t,"middle",e,n)},o.warning=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("warn",t,"top",e,n)},o.middleWarning=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("warn",t,"middle",e,n)},o.otherInfo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("other",t,"top",e,n)},o.middleOtherInfo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("other",t,"middle",e,n)},o.info=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("info",t,"top",e,n)},o.middleInfo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("info",t,"middle",e,n)},o.error=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("error",t,"top",e,n)},o.middleError=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};o.showHint("error",t,"middle",e,n)},o.showUpdateMessage=function(t){function n(t){var e=v.default.find(t,"button");e.onclick=function(){Dui.Animate.startMove(t,{opacity:0},400,function(){e.onclick=null,v.default.remove(t);var n=v.default.find(".dui-update-message");0==v.default.has(n,".dui-tip-text").length&&v.default.remove(n)})}}var i={msg:t},r=(0,s.default)(e.join("")),a=r(i);0==v.default.has(".dui-update-message").length?(a='<div style="top: '+d.default.updateMessage.top+'" class="dui-update-message">'+a+"</div>",new o({tipContent:a,init:function(){var t=v.default.find(this.tipDom,".dui-tip-text");Dui.Animate.startMove(t,{opacity:100},400,function(){n(t)})}})):!function(){var t=v.default.find(".dui-update-message"),e=v.default.prependHTML(t,a);Dui.Animate.startMove(e,{opacity:100},400,function(){n(e)})}()},o._showBasicArrow=function(t){if(!t.pos)return void console.error("必须传pos字段,来表明箭头的位置");if(!t.alignElem)return void console.error("必须传alignElem,来决定Tip的显示位置");t.tipClass=d.default.tipArrowClassMap[t.pos],t.type=t.type||"default",t.tipType="error"==t.type?"dui-tip-error-arrow":"dui-tip-arrow";var e=(0,s.default)(n.join("")),i=e(t);return new o({tipContent:i,init:function(){var e=v.default.getAttr(this.tipDom),n=v.default.getAttr(t.alignElem),o=v.default.getPoint(t.alignElem),i="position: absolute";switch(t.pos){case"l":i+="; top: "+o.top+"px",i+="; left: "+(o.left-e.width-d.default.arrowSize-t.spacing)+"px"; | ||
break;case"r":i+="; top: "+o.top+"px",i+="; left: "+(o.left+n.width+d.default.arrowSize+t.spacing)+"px";break;case"t":i+="; top: "+(o.top-e.height-d.default.arrowSize-t.spacing)+"px",i+="; left: "+(o.left+n.width/2-e.width/2)+"px";break;case"b":i+="; top: "+(o.top+n.height+d.default.arrowSize+t.spacing)+"px",i+="; left: "+(n.left+n.width/2-e.width/2)+"px";break;case"bl":i+="; top: "+(o.top+n.height+d.default.arrowSize+t.spacing)+"px",i+="; left: "+o.left+"px";break;case"br":i+="; top: "+(o.top+n.height+d.default.arrowSize+t.spacing)+"px",i+="; left: "+(o.left+n.width-e.width)+"px"}i+="; display: none; opacity: 1",this.tipDom.style.cssText=i}})},o.tooltip=function(t){function e(){o&&o.show()}function n(){o&&o.hide()}if(!t.el)return void console.error("必须传入el");if(!t.msg)return void console.error("必须传msg");var o=void 0,i="string"==typeof t.el?v.default.find(t.el):t.el;return o=Dui.Tip._showBasicArrow({msg:t.msg,pos:t.pos,alignElem:i,spacing:t.spacing||5}).$on("destroy",function(){i.removeEventListener("mouseover",e),i.removeEventListener("mouseout",n)}),i.addEventListener("mouseover",e),i.addEventListener("mouseout",n),o},o.poptip=function(t){function e(){a&&a.show()}function n(){r.timer=setTimeout(function(){a&&a.hide()},300)}function o(){clearTimeout(r.timer)}function i(){a&&a.hide()}if(!t.el)return void console.error("必须传入el");if(!t.msg)return void console.error("必须传msg");var r=this,a=void 0,u="string"==typeof t.el?v.default.find(t.el):t.el,c=t.trigger?t.trigger:"hover";switch(a=Dui.Tip._showBasicArrow({msg:t.msg,pos:t.pos,alignElem:u,spacing:t.spacing||5}).$on("destroy",function(){switch(c){case"hover":u.removeEventListener("mouseover",e),u.removeEventListener("mouseout",n),this.tipDom.removeEventListener("mouseenter",o),this.tipDom.removeEventListener("mouseleave",i);break;case"click":u.removeEventListener("click",e)}}),c){case"hover":u.addEventListener("mouseover",e),u.addEventListener("mouseout",n),a.tipDom.addEventListener("mouseenter",o),a.tipDom.addEventListener("mouseleave",i);break;case"click":u.addEventListener("click",e)}return a},o.showFormError=function(t){if(!t.el)return void console.error("必须传入el");if(!t.msg)return void console.error("必须传msg");var e=void 0,n="string"==typeof t.el?v.default.find(t.el):t.el;return e=Dui.Tip._showBasicArrow({type:"error",msg:t.msg,pos:t.pos,alignElem:n,spacing:t.spacing||0})},o}()},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={hint:{marginTop:8,minWidth:250,maxWidth:362,iconClass:{warn:"iconfont icon-tishi-20160921",info:"iconfont icon-yunxingyichangtishi-20150921",error:"iconfont icon-cuowu-20160921",success:"iconfont icon-right-2016-0921",other:"iconfont icon-tishi-20160921"},pos:{rel:document.documentElement,top:"0",middle:"35%",dis:50}},tipClassMap:{success:"dui-tip-success",info:"dui-tip-info",warn:"dui-tip-warning",error:"dui-tip-error",other:"dui-tip"},updateMessage:{top:"2%"},arrowSize:5,tipArrowClassMap:{l:"dui-tip-right-arrow",r:"dui-tip-left-arrow",t:"dui-tip-bottom-arrow",b:"dui-tip-top-arrow",bl:"dui-tip-top-left-arrow",br:"dui-tip-top-right-arrow"}}}]); |
@@ -97,3 +97,3 @@ ### 用途 | ||
- Dui.Modal.alert(content[, title]) | ||
- Dui.Modal.alert(content[, title, close]) | ||
@@ -100,0 +100,0 @@ 弹出一个alert对话框。 |
{ | ||
"name": "Dui", | ||
"version": "0.0.4-alpha.1", | ||
"version": "0.0.4-alpha.2", | ||
"description": "针对税友小企业部门的UI组件开发", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -30,2 +30,5 @@ import Template from "lodash/template"; | ||
'<% } %>', | ||
'<% if(title == "" && type == "default") { %>', | ||
'<div style="height: 14px;"></div>', | ||
'<% } %>', | ||
'<% if(type == "custom") { %>', | ||
@@ -188,3 +191,3 @@ '<div class="dui-dialog-custom-bd"><%= content %></div>', | ||
if(this.option.title == "") { | ||
hdHeight = 0; | ||
hdHeight = 14; | ||
} | ||
@@ -389,3 +392,3 @@ | ||
Modal.alert = function(text, title = "提示"){ | ||
Modal.alert = function(text, title = "提示", close = true){ | ||
@@ -395,2 +398,3 @@ return new Modal({ | ||
content: text, | ||
close: close, | ||
okFn: function() { | ||
@@ -397,0 +401,0 @@ this.hide(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
885795
13292