From 38d8544e4fd4d30bd34874a0f2146fb548d0de6b Mon Sep 17 00:00:00 2001 From: mxie <15623530290@163.com> Date: Sat, 16 Jun 2018 11:10:32 +0800 Subject: [PATCH] =?UTF-8?q?demo:=20=E7=94=9F=E6=88=90demo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/webpack.demo.config.js | 2 +- demo/build.js | 8 ++------ demo/build.js.map | 1 + 3 files changed, 4 insertions(+), 7 deletions(-) create mode 100644 demo/build.js.map diff --git a/build/webpack.demo.config.js b/build/webpack.demo.config.js index dd3f5c7..fc88ab3 100644 --- a/build/webpack.demo.config.js +++ b/build/webpack.demo.config.js @@ -3,7 +3,7 @@ const devWebpackConfig = require('./webpack.dev.config.js') const webpackConfig = merge(devWebpackConfig, { devtool: 'source-map', - mode: 'production' + mode: 'production', externals: { 'vue': 'Vue', '@/index': 'DatePicker' diff --git a/demo/build.js b/demo/build.js index 1108e87..0509f87 100644 --- a/demo/build.js +++ b/demo/build.js @@ -1,6 +1,2 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/demo/",t(t.s=7)}([function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;tn.parts.length&&(r.parts.length=n.parts.length)}else{for(var o=[],i=0;i=0&&Math.floor(t)===t&&isFinite(e)}function p(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function f(e){var t=parseFloat(e);return isNaN(t)?e:t}function h(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}function m(e,t){return hr.call(e,t)}function g(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}function y(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function _(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function b(e,t){for(var n in t)e[n]=t[n];return e}function x(e){for(var t={},n=0;n0&&(o=ve(o,(t||"")+"_"+n),he(o[0])&&he(l)&&(u[c]=P(l.text+o[0].text),o.shift()),u.push.apply(u,o)):s(o)?he(l)?u[c]=P(l.text+o):""!==o&&u.push(P(o)):he(o)&&he(l)?u[c]=P(l.text+o.text):(a(e._isVList)&&i(o.tag)&&r(o.key)&&i(t)&&(o.key="__vlist"+t+"_"+n+"__"),u.push(o)));return u}function me(e,t){return(e.__esModule||zr&&"Module"===e[Symbol.toStringTag])&&(e=e.default),c(e)?t.extend(e):e}function ge(e,t,n,r,i){var a=Kr();return a.asyncFactory=e,a.asyncMeta={data:t,context:n,children:r,tag:i},a}function ye(e,t,n){if(a(e.error)&&i(e.errorComp))return e.errorComp;if(i(e.resolved))return e.resolved;if(a(e.loading)&&i(e.loadingComp))return e.loadingComp;if(!i(e.contexts)){var o=e.contexts=[n],s=!0,l=function(){for(var e=0,t=o.length;ebi&&vi[n].id>e.id;)n--;vi.splice(n+1,0,e)}else vi.push(e);yi||(yi=!0,oe(Ne))}}function Fe(e){ki.clear(),Be(e,ki)}function Be(e,t){var n,r,i=Array.isArray(e);if((i||c(e))&&Object.isExtensible(e)){if(e.__ob__){var a=e.__ob__.dep.id;if(t.has(a))return;t.add(a)}if(i)for(n=e.length;n--;)Be(e[n],t);else for(r=Object.keys(e),n=r.length;n--;)Be(e[r[n]],t)}}function ze(e,t,n){Ci.get=function(){return this[t][n]},Ci.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Ci)}function Ue(e){e._watchers=[];var t=e.$options;t.props&&Je(e,t.props),t.methods&&Ge(e,t.methods),t.data?Ye(e):L(e._data={},!0),t.computed&&We(e,t.computed),t.watch&&t.watch!==Nr&&Ze(e,t.watch)}function Je(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],a=!e.$parent;ei.shouldConvert=a;for(var o in t)!function(a){i.push(a);var o=G(a,t,n,e);R(r,a,o),a in e||ze(e,"_props",a)}(o);ei.shouldConvert=!0}function Ye(e){var t=e.$options.data;t=e._data="function"==typeof t?qe(t,e):t||{},l(t)||(t={});for(var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);i--;){var a=n[i];r&&m(r,a)||$(a)||ze(e,"_data",a)}L(t,!0)}function qe(e,t){try{return e.call(t,t)}catch(e){return te(e,t,"data()"),{}}}function We(e,t){var n=e._computedWatchers=Object.create(null),r=Fr();for(var i in t){var a=t[i],o="function"==typeof a?a:a.get;r||(n[i]=new wi(e,o||w,w,Ai)),i in e||Qe(e,i,a)}}function Qe(e,t,n){var r=!Fr();"function"==typeof n?(Ci.get=r?Ke(t):n,Ci.set=w):(Ci.get=n.get?r&&!1!==n.cache?Ke(t):n.get:w,Ci.set=n.set?n.set:w),Object.defineProperty(e,t,Ci)}function Ke(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),Yr.target&&t.depend(),t.value}}function Ge(e,t){e.$options.props;for(var n in t)e[n]=null==t[n]?w:y(t[n],e)}function Ze(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i=0||n.indexOf(e[i])<0)&&r.push(e[i]);return r}return e}function Ot(e){this._init(e)}function Tt(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=_(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}function Pt(e){e.mixin=function(e){return this.options=Q(this.options,e),this}}function It(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var a=e.name||n.options.name,o=function(e){this._init(e)};return o.prototype=Object.create(n.prototype),o.prototype.constructor=o,o.cid=t++,o.options=Q(n.options,e),o.super=n,o.options.props&&Et(o),o.options.computed&&jt(o),o.extend=n.extend,o.mixin=n.mixin,o.use=n.use,kr.forEach(function(e){o[e]=n[e]}),a&&(o.options.components[a]=o),o.superOptions=n.options,o.extendOptions=e,o.sealedOptions=b({},o.options),i[r]=o,o}}function Et(e){var t=e.options.props;for(var n in t)ze(e.prototype,"_props",n)}function jt(e){var t=e.options.computed;for(var n in t)Qe(e.prototype,n,t[n])}function Nt(e){kr.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&l(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}function Lt(e){return e&&(e.Ctor.options.name||e.tag)}function Rt(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!u(e)&&e.test(t)}function Ht(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var a in n){var o=n[a];if(o){var s=Lt(o.componentOptions);s&&!t(s)&&Vt(n,a,r,i)}}}function Vt(e,t,n,r){var i=e[t];i&&i!==r&&i.componentInstance.$destroy(),e[t]=null,v(n,t)}function Ft(e){for(var t=e.data,n=e,r=e;i(r.componentInstance);)r=r.componentInstance._vnode,r.data&&(t=Bt(r.data,t));for(;i(n=n.parent);)n.data&&(t=Bt(t,n.data));return zt(t.staticClass,t.class)}function Bt(e,t){return{staticClass:Ut(e.staticClass,t.staticClass),class:i(e.class)?[e.class,t.class]:t.class}}function zt(e,t){return i(e)||i(t)?Ut(e,Jt(t)):""}function Ut(e,t){return e?t?e+" "+t:e:t||""}function Jt(e){return Array.isArray(e)?Yt(e):c(e)?qt(e):"string"==typeof e?e:""}function Yt(e){for(var t,n="",r=0,a=e.length;r-1?Qi[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Qi[e]=/HTMLUnknownElement/.test(t.toString())}function Kt(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}function Gt(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function Zt(e,t){return document.createElementNS(Ji[e],t)}function Xt(e){return document.createTextNode(e)}function en(e){return document.createComment(e)}function tn(e,t,n){e.insertBefore(t,n)}function nn(e,t){e.removeChild(t)}function rn(e,t){e.appendChild(t)}function an(e){return e.parentNode}function on(e){return e.nextSibling}function sn(e){return e.tagName}function cn(e,t){e.textContent=t}function ln(e,t,n){e.setAttribute(t,n)}function un(e,t){var n=e.data.ref;if(n){var r=e.context,i=e.componentInstance||e.elm,a=r.$refs;t?Array.isArray(a[n])?v(a[n],i):a[n]===i&&(a[n]=void 0):e.data.refInFor?Array.isArray(a[n])?a[n].indexOf(i)<0&&a[n].push(i):a[n]=[i]:a[n]=i}}function dn(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&i(e.data)===i(t.data)&&pn(e,t)||a(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&r(t.asyncFactory.error))}function pn(e,t){if("input"!==e.tag)return!0;var n,r=i(n=e.data)&&i(n=n.attrs)&&n.type,a=i(n=t.data)&&i(n=n.attrs)&&n.type;return r===a||Ki(r)&&Ki(a)}function fn(e,t,n){var r,a,o={};for(r=t;r<=n;++r)a=e[r].key,i(a)&&(o[a]=r);return o}function hn(e,t){(e.data.directives||t.data.directives)&&vn(e,t)}function vn(e,t){var n,r,i,a=e===Xi,o=t===Xi,s=mn(e.data.directives,e.context),c=mn(t.data.directives,t.context),l=[],u=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,yn(i,"update",t,e),i.def&&i.def.componentUpdated&&u.push(i)):(yn(i,"bind",t,e),i.def&&i.def.inserted&&l.push(i));if(l.length){var d=function(){for(var n=0;n-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Nn(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");n=n.trim(),n?e.setAttribute("class",n):e.removeAttribute("class")}}function Ln(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&b(t,ga(e.name||"v")),b(t,e),t}return"string"==typeof e?ga(e):void 0}}function Rn(e){Aa(function(){Aa(e)})}function Hn(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),jn(e,t))}function Vn(e,t){e._transitionClasses&&v(e._transitionClasses,t),Nn(e,t)}function Fn(e,t,n){var r=Bn(e,t),i=r.type,a=r.timeout,o=r.propCount;if(!i)return n();var s=i===_a?wa:Ca,c=0,l=function(){e.removeEventListener(s,u),n()},u=function(t){t.target===e&&++c>=o&&l()};setTimeout(function(){c0&&(n=_a,u=o,d=a.length):t===ba?l>0&&(n=ba,u=l,d=c.length):(u=Math.max(o,l),n=u>0?o>l?_a:ba:null,d=n?n===_a?a.length:c.length:0),{type:n,timeout:u,propCount:d,hasTransform:n===_a&&$a.test(r[xa+"Property"])}}function zn(e,t){for(;e.length1}function Qn(e,t){!0!==t.data.show&&Jn(t)}function Kn(e,t,n){Gn(e,t,n),(Tr||Ir)&&setTimeout(function(){Gn(e,t,n)},0)}function Gn(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var a,o,s=0,c=e.options.length;s-1,o.selected!==a&&(o.selected=a);else if(k(Xn(o),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function Zn(e,t){return t.every(function(t){return!k(t,e)})}function Xn(e){return"_value"in e?e._value:e.value}function er(e){e.target.composing=!0}function tr(e){e.target.composing&&(e.target.composing=!1,nr(e.target,"input"))}function nr(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function rr(e){return!e.componentInstance||e.data&&e.data.transition?e:rr(e.componentInstance._vnode)}function ir(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?ir(be(t.children)):e}function ar(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var a in i)t[mr(a)]=i[a];return t}function or(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function sr(e){for(;e=e.parent;)if(e.data.transition)return!0}function cr(e,t){return t.key===e.key&&t.tag===e.tag}function lr(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function ur(e){e.data.newPos=e.elm.getBoundingClientRect()}function dr(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var a=e.elm.style;a.transform=a.WebkitTransform="translate("+r+"px,"+i+"px)",a.transitionDuration="0s"}}var pr=Object.prototype.toString,fr=(h("slot,component",!0),h("key,ref,slot,slot-scope,is")),hr=Object.prototype.hasOwnProperty,vr=/-(\w)/g,mr=g(function(e){return e.replace(vr,function(e,t){return t?t.toUpperCase():""})}),gr=g(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),yr=/\B([A-Z])/g,_r=g(function(e){return e.replace(yr,"-$1").toLowerCase()}),br=function(e,t,n){return!1},xr=function(e){return e},wr="data-server-rendered",kr=["component","directive","filter"],Cr=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],Ar={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:br,isReservedAttr:br,isUnknownElement:br,getTagNamespace:w,parsePlatformTagName:xr,mustUseProp:br,_lifecycleHooks:Cr},$r=Object.freeze({}),Dr=/[^\w.$]/,Mr="__proto__"in{},Sr="undefined"!=typeof window,Or=Sr&&window.navigator.userAgent.toLowerCase(),Tr=Or&&/msie|trident/.test(Or),Pr=Or&&Or.indexOf("msie 9.0")>0,Ir=Or&&Or.indexOf("edge/")>0,Er=Or&&Or.indexOf("android")>0,jr=Or&&/iphone|ipad|ipod|ios/.test(Or),Nr=(Or&&/chrome\/\d+/.test(Or),{}.watch),Lr=!1;if(Sr)try{var Rr={};Object.defineProperty(Rr,"passive",{get:function(){Lr=!0}}),window.addEventListener("test-passive",null,Rr)}catch(e){}var Hr,Vr,Fr=function(){return void 0===Hr&&(Hr=!Sr&&void 0!==e&&"server"===e.process.env.VUE_ENV),Hr},Br=Sr&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,zr="undefined"!=typeof Symbol&&S(Symbol)&&"undefined"!=typeof Reflect&&S(Reflect.ownKeys);Vr="undefined"!=typeof Set&&S(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var Ur=w,Jr=0,Yr=function(){this.id=Jr++,this.subs=[]};Yr.prototype.addSub=function(e){this.subs.push(e)},Yr.prototype.removeSub=function(e){v(this.subs,e)},Yr.prototype.depend=function(){Yr.target&&Yr.target.addDep(this)},Yr.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t1?_(n):n;for(var r=_(arguments,1),i=0,a=n.length;iparseInt(this.max)&&Vt(i,a[0],a,this._vnode)),e.data.keepAlive=!0}return e}},Ii={KeepAlive:Pi};!function(e){var t={};t.get=function(){return Ar},Object.defineProperty(e,"config",t),e.util={warn:Ur,extend:b,mergeOptions:Q,defineReactive:R},e.set=H,e.delete=V,e.nextTick=oe,e.options=Object.create(null),kr.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,b(e.options.components,Ii),Tt(e),Pt(e),It(e),Nt(e)}(Ot),Object.defineProperty(Ot.prototype,"$isServer",{get:Fr}),Object.defineProperty(Ot.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Ot.version="2.5.2";var Ei,ji,Ni=h("style,class"),Li=h("input,textarea,option,select,progress"),Ri=function(e,t,n){return"value"===n&&Li(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Hi=h("contenteditable,draggable,spellcheck"),Vi=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Fi="http://www.w3.org/1999/xlink",Bi=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},zi=function(e){return Bi(e)?e.slice(6,e.length):""},Ui=function(e){return null==e||!1===e},Ji={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Yi=h("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),qi=h("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Wi=function(e){return Yi(e)||qi(e)},Qi=Object.create(null),Ki=h("text,number,password,search,email,tel,url"),Gi=Object.freeze({createElement:Gt,createElementNS:Zt,createTextNode:Xt,createComment:en,insertBefore:tn,removeChild:nn,appendChild:rn,parentNode:an,nextSibling:on,tagName:sn,setTextContent:cn,setAttribute:ln}),Zi={create:function(e,t){un(t)},update:function(e,t){e.data.ref!==t.data.ref&&(un(e,!0),un(t))},destroy:function(e){un(e,!0)}},Xi=new Wr("",{},[]),ea=["create","activate","update","remove","destroy"],ta={create:hn,update:hn,destroy:function(e){hn(e,Xi)}},na=Object.create(null),ra=[Zi,ta],ia={create:_n,update:_n},aa={create:xn,update:xn},oa="__r",sa="__c",ca={create:$n,update:$n},la={create:Dn,update:Dn},ua=g(function(e){var t={},n=/;(?![^(]*\))/g,r=/:(.+)/;return e.split(n).forEach(function(e){if(e){var n=e.split(r);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}),da=/^--/,pa=/\s*!important$/,fa=function(e,t,n){if(da.test(t))e.style.setProperty(t,n);else if(pa.test(n))e.style.setProperty(t,n.replace(pa,""),"important");else{var r=va(t);if(Array.isArray(n))for(var i=0,a=n.length;ih?(d=r(n[g+1])?null:n[g+1].elm,y(e,d,n,f,g,a)):f>g&&b(e,t,p,h)}function k(e,t,n,r){for(var a=n;a1&&void 0!==arguments[1]?arguments[1]:1,n=parseInt(e/t);return Array.apply(null,{length:n}).map(function(e,n){return n*t})},i=function(e){var t=(e||"").split(":");if(t.length>=2){return{hours:parseInt(t[0],10),minutes:parseInt(t[1],10)}}return null},a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"24",n=e.hours;n="24"===t?n:n%12||12,n=n<10?"0"+n:n;var r=e.minutes<10?"0"+e.minutes:e.minutes,i=n+":"+r;return"12"===t&&(i+=e.hours>=12?" pm":" am"),i};t.a={props:{startAt:null,endAt:null,value:null,show:Boolean},data:function(){var e=this.$parent.translation,t=this.$parent.minuteStep,n=[r(24,1),r(60,t||1)];return 0===t&&n.push(r(60,1)),{months:e.months,dates:[],years:[],now:new Date,currentPanel:"date",times:n}},computed:{days:function(){var e=this.$parent.translation.days,t=+this.$parent.firstDayOfWeek;return e.concat(e).slice(t,t+7)},timeType:function(){return/h+/.test(this.$parent.format)?"12":"24"},timeSelectOptions:function(){var e=[],t=this.$parent.timePickerOptions;if(!t)return[];var n=i(t.start),r=i(t.end),o=i(t.step);if(n&&r&&o)for(var s=n.minutes+60*n.hours,c=r.minutes+60*r.hours,l=o.minutes+60*o.hours,u=Math.floor((c-s)/l),d=0;d<=u;d++){var p=s+d*l,f=Math.floor(p/60),h=p%60,v={hours:f,minutes:h};e.push({value:v,label:a(v,this.timeType)})}return e},currentYear:function(){return this.now.getFullYear()},currentMonth:function(){return this.now.getMonth()},curHour:function(){return this.now.getHours()},curMinute:function(){return this.now.getMinutes()},curSecond:function(){return this.now.getSeconds()}},created:function(){this.updateCalendar()},watch:{show:function(e){e&&(this.currentPanel="date",this.updateNow())},value:{handler:"updateNow",immediate:!0},now:"updateCalendar"},filters:{timeText:function(e){return("00"+e).slice(String(e).length)}},methods:{updateNow:function(){this.now=this.value?new Date(this.value):new Date},updateCalendar:function(){function e(e,t,n,r){return Array.apply(null,{length:n}).map(function(n,i){var a=t+i,o=new Date(e.getFullYear(),e.getMonth(),a,0,0,0);return o.setDate(a),{title:o.toLocaleDateString(),date:o,day:a,classes:r}})}var t=this.$parent.firstDayOfWeek,n=new Date(this.now);n.setDate(0);var r=(n.getDay()+7-t)%7+1,i=n.getDate()-(r-1),a=e(n,i,r,"lastMonth");n.setMonth(n.getMonth()+2,0);var o=n.getDate(),s=e(n,1,o,"curMonth");n.setMonth(n.getMonth()+1,1);for(var c=42-(r+o),l=e(n,1,c,"nextMonth"),u=0,d=0,p=a.concat(s,l),f=new Array(6);u<42;)f[d++]=p.slice(u,u+=7);this.dates=f},getDateClasses:function(e){var t=[],n=new Date(e.date).setHours(0,0,0,0),r=new Date(e.date).setHours(23,59,59,999),i=this.value?new Date(this.value).setHours(0,0,0,0):0,a=this.startAt?new Date(this.startAt).setHours(0,0,0,0):0,o=this.endAt?new Date(this.endAt).setHours(0,0,0,0):0,s=(new Date).setHours(0,0,0,0);return this.$parent.disabledDays.some(function(e){return new Date(e).setHours(0,0,0,0)===n})||""!==this.$parent.notBefore&&rnew Date(this.$parent.notAfter).getTime()?"disabled":(t.push(e.classes),n===s&&t.push("today"),n===i?t.push("current"):a?no?t.push("disabled"):i&&n>=i&&t.push("inrange")),t.join(" "))},getTimeClasses:function(e,t){var n=void 0,r=void 0,i=this.startAt?new Date(this.startAt):0,a=this.endAt?new Date(this.endAt):0,o=[];switch(t){case-1:n=60*this.curHour+this.curMinute,r=new Date(this.now).setHours(Math.floor(e/60),e%60,0);break;case 0:n=this.curHour,r=new Date(this.now).setHours(e);break;case 1:n=this.curMinute,r=new Date(this.now).setMinutes(e);break;case 2:n=this.curSecond,r=new Date(this.now).setSeconds(e)}return""!==this.$parent.notBefore&&rnew Date(this.$parent.notAfter).getTime()?"disabled":(e===n?o.push("cur-time"):i?ra&&o.push("disabled"),o.join(" "))},showMonths:function(){"months"===this.currentPanel?this.currentPanel="date":this.currentPanel="months"},showYears:function(){if("years"===this.currentPanel)this.currentPanel="date";else{for(var e=10*Math.floor(this.now.getFullYear()/10),t=[],n=0;n<10;n++)t.push(e+n);this.years=t,this.currentPanel="years"}},changeYear:function(e){if("years"===this.currentPanel)this.years=this.years.map(function(t){return t+10*e});else{var t=new Date(this.now);t.setFullYear(t.getFullYear()+e,t.getMonth(),1),this.now=t}},changeMonth:function(e){var t=new Date(this.now);t.setMonth(t.getMonth()+e,1),this.now=t},scrollIntoView:function(e,t){if(!t)return void(e.scrollTop=0);var n=t.offsetTop,r=t.offsetTop+t.offsetHeight,i=e.scrollTop,a=i+e.clientHeight;na&&(e.scrollTop=r-e.clientHeight)},selectDate:function(e){var t=this;if(-1===this.getDateClasses(e).indexOf("disabled")){var n=new Date(e.date);"datetime"===this.$parent.type&&(this.value instanceof Date&&n.setHours(this.value.getHours(),this.value.getMinutes(),this.value.getSeconds()),this.startAt&&n.getTime()new Date(this.endAt).getTime()&&(n=new Date(this.endAt)),this.currentPanel="time",this.$nextTick(function(){Array.prototype.forEach.call(t.$el.querySelectorAll(".mx-time-list-wrapper"),function(e){t.scrollIntoView(e,e.querySelector(".cur-time"))})})),this.now=n,this.$emit("input",n),this.$emit("select")}},selectYear:function(e){var t=new Date(this.now);t.setFullYear(e),this.now=t,this.value&&(this.$emit("input",t),this.$emit("select",!0)),this.currentPanel="months"},selectMonth:function(e){var t=new Date(this.now);t.setMonth(e),this.now=t,this.value&&(this.$emit("input",t),this.$emit("select",!0)),this.currentPanel="date"},selectTime:function(e,t){if(-1===this.getTimeClasses(e,t).indexOf("disabled")){var n=new Date(this.now);0===t?n.setHours(e):1===t?n.setMinutes(e):2===t&&n.setSeconds(e),this.now=n,this.$emit("input",n),this.$emit("select")}},pickTime:function(e){if(-1===this.getTimeClasses(60*e.hours+e.minutes,-1).indexOf("disabled")){var t=new Date(this.now);t.setHours(e.hours,e.minutes,0),this.now=t,this.$emit("input",t),this.$emit("select")}}}}},function(e,t,n){"use strict";var r=n(18),i=n(6);t.a={name:"DatePicker",components:{CalendarPanel:r.a},props:{value:null,format:{type:String,default:"yyyy-MM-dd"},range:{type:Boolean,default:!1},type:{type:String,default:"date"},width:{type:[String,Number],default:210},placeholder:String,lang:{type:String,default:"zh"},shortcuts:{type:[Boolean,Array],default:!0},disabledDays:{type:Array,default:function(){return[]}},notBefore:{default:""},notAfter:{default:""},firstDayOfWeek:{default:7,type:Number,validator:function(e){return e>=1&&e<=7}},minuteStep:{type:Number,default:0,validator:function(e){return e>=0&&e<=60}},timePickerOptions:{type:Object,default:function(){return{}}},confirm:{type:Boolean,default:!1},inputClass:{type:String,default:"mx-input"},confirmText:{type:String,default:"OK"},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!1}},data:function(){return{showPopup:!1,showCloseIcon:!1,currentValue:this.value,position:null,userInput:null,ranges:[]}},watch:{value:{handler:function(e){this.range?this.currentValue=this.isValidRange(e)?e.slice(0,2):[void 0,void 0]:this.currentValue=this.isValidDate(e)?e:void 0},immediate:!0},showPopup:function(e){e?this.$nextTick(this.displayPopup):this.userInput=null}},computed:{translation:function(){return i.a[this.lang]||i.a.en},innerPlaceholder:function(){return this.placeholder||(this.range?this.translation.placeholder.dateRange:this.translation.placeholder.date)},text:function(){return!this.range&&this.isValidDate(this.value)?null!==this.userInput?this.userInput:this.stringify(this.value):this.range&&this.isValidRange(this.value)?this.stringify(this.value[0])+" ~ "+this.stringify(this.value[1]):""}},methods:{handleInput:function(e){this.userInput=e.target.value},handleChange:function(e){var t=e.target.value,n=this.parseDate(t,this.format);if(n&&this.editable&&!this.range){if(this.notBefore&&nnew Date(this.notAfter))return;for(var r=0,i=this.disabledDays.length;r0&&void 0!==arguments[0]&&arguments[0];this.confirm||this.disabled||(this.updateDate(),e||"date"!==this.type||this.range||(console.log("show"),this.closePopup()))},closePopup:function(){this.showPopup=!1},togglePopup:function(){this.showPopup?(this.$refs.input.blur(),this.showPopup=!1):(this.$refs.input.focus(),this.showPopup=!0)},hoverIcon:function(e){this.disabled||("mouseenter"===e.type&&this.text&&(this.showCloseIcon=!0),"mouseleave"===e.type&&(this.showCloseIcon=!1))},clickIcon:function(){this.disabled||(this.showCloseIcon?(this.$emit("input",""),this.$emit("change","")):this.togglePopup())},parseDate:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd",n=!0,r={y:0,M:1,d:0,H:0,h:0,m:0,s:0};return t.replace(/([^yMdHhms]*?)(([yMdHhms])\3*)([^yMdHhms]*?)/g,function(t,i,a,o,s,c,l){var u=new RegExp(i+"(\\d{"+a.length+"})"+s);return-1===e.search(u)?n=!1:e=e.replace(u,function(e,t){return r[o]=parseInt(t),""}),""}),!!n&&(r.M--,new Date(r.y,r.M,r.d,r.H||r.h,r.m,r.s))},formatDate:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd HH:mm:ss",n=e.getHours(),r={"M+":e.getMonth()+1,"[Dd]+":e.getDate(),"H+":n,"h+":n%12||12,"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds(),a:n>=12?"pm":"am",A:n>=12?"PM":"AM"},i=t.replace(/[Yy]+/g,function(t){return(""+e.getFullYear()).slice(4-t.length)});return Object.keys(r).forEach(function(e){i=i.replace(new RegExp(e),function(t){var n=""+r[e];return 1===t.length?n:("00"+n).slice(n.length)})}),i},stringify:function(e){return this.formatDate(new Date(e),this.format)},isValidDate:function(e){return!!new Date(e).getTime()},isValidRange:function(e){return Array.isArray(e)&&2===e.length&&this.isValidDate(e[0])&&this.isValidDate(e[1])},selectRange:function(e){this.$emit("input",[e.start,e.end]),this.$emit("change",[e.start,e.end])},initRanges:function(){var e=this;Array.isArray(this.shortcuts)?this.ranges=this.shortcuts:this.shortcuts?(this.ranges=[{text:"未来7天",start:new Date,end:new Date(Date.now()+6048e5)},{text:"未来30天",start:new Date,end:new Date(Date.now()+2592e6)},{text:"最近7天",start:new Date(Date.now()-6048e5),end:new Date},{text:"最近30天",start:new Date(Date.now()-2592e6),end:new Date}],this.ranges.forEach(function(t,n){t.text=e.translation.pickers[n]})):this.ranges=[]},displayPopup:function(){if(!this.disabled){var e=document.documentElement.clientWidth,t=document.documentElement.clientHeight,n=this.$el.getBoundingClientRect(),r=this.$refs.calendar.getBoundingClientRect();this.position={},e-n.left\n',demo2:'\n\n',demo3:'\n\n'}},methods:{confirm:function(e){console.log(e)}}}},function(e,t,n){t=e.exports=n(0)(),t.push([e.i,'.mx-datepicker{position:relative;display:inline-block;color:#73879c;font:14px/1.5 Helvetica Neue,Helvetica,Arial,Microsoft Yahei,sans-serif}.mx-datepicker *{box-sizing:border-box}.mx-datepicker.disabled{opacity:.7;cursor:not-allowed}.mx-datepicker-popup{position:absolute;width:250px;margin-top:1px;margin-bottom:1px;border:1px solid #d9d9d9;background-color:#fff;box-shadow:0 6px 12px rgba(0,0,0,.175);z-index:1000}.mx-datepicker-popup.range{width:496px}.mx-input{display:inline-block;width:100%;height:34px;padding:6px 30px 6px 10px;font-size:14px;line-height:1.4;color:#555;background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.mx-input.disabled,.mx-input:disabled{opacity:.7;cursor:not-allowed}.mx-input:focus{outline:none}.mx-input-icon{top:0;right:0;position:absolute;width:30px;height:100%;color:#888;text-align:center;font-style:normal}.mx-input-icon:after{content:"";display:inline-block;width:0;height:100%;vertical-align:middle}.mx-input-icon__calendar{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA00lEQVQ4T72SzQ2CQBCF54UGKIES6EAswQq0BS/A3PQ0hAt0oKVQgiVYAkcuZMwSMOyCyRKNe9uf+d6b2Qf6csGtL8sy7vu+Zebn/E5EoiAIwjRNH/PzBUBEGiJqmPniAMw+YeZkFSAiJwA3j45aVT0wsxGitwOjDGDnASBVvU4OLQARRURk9e4CAcSqWn8CLHp3Ae6MXAe/B4yzUeMkz/P9ZgdFUQzFIwD/B4yKgwMTos0OtvzCHcDRJ0gAzlmW1VYSq6oKu66LfQBTjC2AT+Hamxcml5IRpPq3VQAAAABJRU5ErkJggg==);background-position:50%;background-repeat:no-repeat}.mx-input-icon__close:before{content:"\\2716";vertical-align:middle}.mx-datepicker-top{text-align:left;padding:0 12px;line-height:34px;border-bottom:1px solid rgba(0,0,0,.05)}.mx-datepicker-top>span{white-space:nowrap;cursor:pointer}.mx-datepicker-top>span:hover{color:#1284e7}.mx-datepicker-top>span:after{content:"|";margin:0 10px;color:#48576a}.mx-datepicker-footer{padding:4px;clear:both;text-align:right;border-top:1px solid rgba(0,0,0,.05)}.mx-datepicker-btn{font-size:12px;line-height:1;padding:7px 15px;margin:0 5px;cursor:pointer;background-color:transparent;outline:none;border:none;border-radius:3px}.mx-datepicker-btn-confirm{border:1px solid rgba(0,0,0,.1);color:#73879c}.mx-datepicker-btn-confirm:hover{color:#1284e7;border-color:#1284e7}',""])},function(e,t,n){t=e.exports=n(0)(),t.push([e.i,".demo{margin:20px}.label{display:inline-block;margin-right:1em}.pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f6f8fa;border-radius:3px}.example{padding:45px;word-wrap:break-word;background-color:#fff;border:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.example>.demo{display:inline-block}.tips{margin:0;padding:0 1em;color:#6a737d;border-left:.25em solid #dfe2e5}",""])},function(e,t,n){t=e.exports=n(0)(),t.push([e.i,".mx-calendar{float:left;width:100%;padding:6px 12px}.mx-calendar a{color:inherit;text-decoration:none;cursor:pointer}.mx-calendar-header{line-height:34px;text-align:center}.mx-calendar-header>a:hover{color:#1284e7}.mx-calendar__next-icon,.mx-calendar__prev-icon{font-size:20px;padding:0 6px}.mx-calendar__prev-icon{float:left}.mx-calendar__next-icon{float:right}.mx-calendar-content{height:224px;overflow:hidden}.mx-calendar-table{width:100%;font-size:12px;table-layout:fixed;border-collapse:collapse;border-spacing:0}.mx-calendar-table .today{color:#20a0ff}.mx-calendar-table .lastMonth,.mx-calendar-table .nextMonth{color:#ddd}.mx-calendar-table td,.mx-calendar-table th{width:32px;height:32px;text-align:center}.mx-calendar-table td{cursor:pointer}.mx-calendar-month>a:hover,.mx-calendar-table td.inrange,.mx-calendar-table td:hover,.mx-calendar-year>a:hover{background-color:#eaf8fe}.mx-calendar-month>a.current,.mx-calendar-table td.current,.mx-calendar-year>a.current{color:#fff;background-color:#1284e7}.mx-calendar-table td.disabled{cursor:not-allowed;color:#ccc;background-color:#f3f3f3}.mx-calendar-month,.mx-calendar-time,.mx-calendar-year{width:100%;height:100%;padding:7px 0;text-align:center}.mx-calendar-year>a{display:inline-block;width:40%;margin:1px 5%;line-height:40px}.mx-calendar-month>a{display:inline-block;width:30%;line-height:40px;margin:8px 1.5%}.mx-time-list-wrapper{position:relative;display:inline-block;width:100%;height:100%;border-top:1px solid rgba(0,0,0,.05);border-left:1px solid rgba(0,0,0,.05);box-sizing:border-box;overflow-y:auto}.mx-time-list-wrapper::-webkit-scrollbar{width:8px;height:8px}.mx-time-list-wrapper::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.05);border-radius:10px;box-shadow:inset 1px 1px 0 rgba(0,0,0,.1)}.mx-time-list-wrapper:hover::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.2)}.mx-time-list-wrapper:first-child{border-left:0}.mx-time-picker-item{text-align:left;padding-left:10px}.mx-time-list{margin:0;padding:0;list-style:none}.mx-time-item{width:100%;font-size:12px;height:30px;line-height:30px;cursor:pointer}.mx-time-item:hover{background-color:#eaf8fe}.mx-time-item.cur-time{color:#fff;background-color:#1284e7}.mx-time-item.disabled{cursor:not-allowed;color:#ccc;background-color:#f3f3f3}",""])},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(u===setTimeout)return setTimeout(e,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function a(e){if(d===clearTimeout)return clearTimeout(e);if((d===r||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function o(){v&&f&&(v=!1,f.length?h=f.concat(h):m=-1,h.length&&s())}function s(){if(!v){var e=i(o);v=!0;for(var t=h.length;t;){for(f=h,h=[];++m1)for(var n=1;n=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(16),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){"use strict";function r(e){n(25)}var i=n(9),a=n(22),o=n(1),s=r,c=o(i.a,a.a,!1,s,null,null);t.a=c.exports},function(e,t,n){"use strict";function r(e){n(23)}var i=n(10),a=n(20),o=n(1),s=r,c=o(i.a,a.a,!1,s,null,null);t.a=c.exports},function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:e.closePopup,expression:"closePopup"}],staticClass:"mx-datepicker",class:{disabled:e.disabled},style:{width:e.width+"px","min-width":e.range?"datetime"===e.type?"320px":"210px":"140px"}},[n("input",{ref:"input",class:e.inputClass,attrs:{name:"date",disabled:e.disabled,readonly:!e.editable||e.range,placeholder:e.innerPlaceholder},domProps:{value:e.text},on:{mouseenter:e.hoverIcon,mouseleave:e.hoverIcon,click:e.togglePopup,input:e.handleInput,change:e.handleChange,mousedown:function(e){e.preventDefault()}}}),e._v(" "),n("i",{staticClass:"mx-input-icon",class:e.showCloseIcon?"mx-input-icon__close":"mx-input-icon__calendar",on:{mouseenter:e.hoverIcon,mouseleave:e.hoverIcon,click:e.clickIcon}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.showPopup,expression:"showPopup"}],ref:"calendar",staticClass:"mx-datepicker-popup",class:{range:e.range},style:e.position},[e.range?n("div",{staticStyle:{overflow:"hidden"}},[e.ranges.length?n("div",{staticClass:"mx-datepicker-top"},e._l(e.ranges,function(t){return n("span",{on:{click:function(n){e.selectRange(t)}}},[e._v(e._s(t.text))])})):e._e(),e._v(" "),n("calendar-panel",{staticStyle:{width:"50%","box-shadow":"1px 0 rgba(0, 0, 0, .1)"},attrs:{"end-at":e.currentValue[1],show:e.showPopup},on:{select:e.selectDate},model:{value:e.currentValue[0],callback:function(t){e.$set(e.currentValue,0,t)},expression:"currentValue[0]"}}),e._v(" "),n("calendar-panel",{staticStyle:{width:"50%"},attrs:{"start-at":e.currentValue[0],show:e.showPopup},on:{select:e.selectDate},model:{value:e.currentValue[1],callback:function(t){e.$set(e.currentValue,1,t)},expression:"currentValue[1]"}})],1):n("calendar-panel",{attrs:{show:e.showPopup},on:{select:e.selectDate},model:{value:e.currentValue,callback:function(t){e.currentValue=t},expression:"currentValue"}}),e._v(" "),e.confirm?n("div",{staticClass:"mx-datepicker-footer"},[n("button",{staticClass:"mx-datepicker-btn mx-datepicker-btn-confirm",attrs:{type:"button"},on:{click:e.confirmDate}},[e._v(" "+e._s(e.confirmText))])]):e._e()],1)])},i=[],a={render:r,staticRenderFns:i};t.a=a},function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app"}},[n("div",{staticClass:"example"},[n("section",{staticClass:"demo"},[n("span",{staticClass:"label"},[e._v("default:")]),e._v(" "),n("date-picker",{attrs:{lang:"en",editable:""},model:{value:e.value1,callback:function(t){e.value1=t},expression:"value1"}})],1),e._v(" "),n("section",{staticClass:"demo"},[n("span",{staticClass:"label"},[e._v("range:")]),e._v(" "),n("date-picker",{attrs:{range:"",lang:"en"},model:{value:e.value2,callback:function(t){e.value2=t},expression:"value2"}})],1),e._v(" "),n("pre",{staticClass:"pre"},[e._v(e._s(e.demo1))])]),e._v(" "),n("div",{staticClass:"example"},[n("section",{staticClass:"demo"},[n("span",{staticClass:"label"},[e._v("datetime:")]),e._v(" "),n("date-picker",{attrs:{lang:"en",type:"datetime",format:"yyyy-MM-dd HH:mm:ss"},model:{value:e.value3,callback:function(t){e.value3=t},expression:"value3"}})],1),e._v(" "),n("section",{staticClass:"demo"},[n("span",{staticClass:"label"},[e._v("datetime with minute-step picker:")]),e._v(" "),n("date-picker",{attrs:{lang:"en",type:"datetime",format:"yyyy-MM-dd hh:mm:ss a","time-picker-options":{start:"00:00",step:"00:30",end:"23:30"}},model:{value:e.value4,callback:function(t){e.value4=t},expression:"value4"}})],1),e._v(" "),n("section",{staticClass:"demo"},[n("span",{staticClass:"label"},[e._v("datetime range:")]),e._v(" "),n("date-picker",{attrs:{range:"",type:"datetime",lang:"en",format:"yyyy-MM-dd HH:mm:ss"},model:{value:e.value5,callback:function(t){e.value5=t},expression:"value5"}})],1),e._v(" "),n("blockquote",{staticClass:"tips"},[e._v("\n if you use the datetime, you should set the format which default is 'yyyy-MM-dd'\n ")]),e._v(" "),n("pre",{staticClass:"pre"},[e._v(e._s(e.demo2))])]),e._v(" "),n("div",{staticClass:"example"},[n("section",{staticClass:"demo"},[n("span",{staticClass:"label"},[e._v("with confirm:")]),e._v(" "),n("date-picker",{attrs:{format:"yyyy-MM-dd",lang:"en",confirm:""},model:{value:e.value6,callback:function(t){e.value6=t},expression:"value6"}})],1),e._v(" "),n("section",{staticClass:"demo"},[n("span",{staticClass:"label"},[e._v("datetime with confirm:")]),e._v(" "),n("date-picker",{attrs:{type:"datetime",lang:"en",format:"yyyy-MM-dd hh:mm:ss",confirm:""},model:{value:e.value7,callback:function(t){e.value7=t},expression:"value7"}})],1),e._v(" "),n("section",{staticClass:"demo"},[n("span",{staticClass:"label"},[e._v("range with confirm:")]),e._v(" "),n("date-picker",{attrs:{range:"",lang:"en",format:"yyyy-MM-dd",confirm:""},on:{confirm:e.confirm},model:{value:e.value8,callback:function(t){e.value8=t},expression:"value8"}})],1),e._v(" "),n("blockquote",{staticClass:"tips"},[e._v("\n Recommend to use the confirm option when the type is 'datetime' or range is true \n ")]),e._v(" "),n("pre",{staticClass:"pre"},[e._v(e._s(e.demo3))])])])},i=[],a={render:r,staticRenderFns:i};t.a=a},function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"mx-calendar"},["time"===e.currentPanel?n("div",{staticClass:"mx-calendar-header"},[n("a",{on:{click:function(t){e.currentPanel="date"}}},[e._v(e._s(e.now.toLocaleDateString()))])]):n("div",{staticClass:"mx-calendar-header"},[n("a",{staticClass:"mx-calendar__prev-icon",on:{click:function(t){e.changeYear(-1)}}},[e._v("«")]),e._v(" "),n("a",{directives:[{name:"show",rawName:"v-show",value:"date"===e.currentPanel,expression:"currentPanel === 'date'"}],staticClass:"mx-calendar__prev-icon",on:{click:function(t){e.changeMonth(-1)}}},[e._v("‹")]),e._v(" "),n("a",{staticClass:"mx-calendar__next-icon",on:{click:function(t){e.changeYear(1)}}},[e._v("»")]),e._v(" "),n("a",{directives:[{name:"show",rawName:"v-show",value:"date"===e.currentPanel,expression:"currentPanel === 'date'"}],staticClass:"mx-calendar__next-icon",on:{click:function(t){e.changeMonth(1)}}},[e._v("›")]),e._v(" "),n("a",{on:{click:e.showMonths}},[e._v(e._s(e.months[e.currentMonth]))]),e._v(" "),n("a",{on:{click:e.showYears}},[e._v(e._s(e.currentYear))])]),e._v(" "),n("div",{staticClass:"mx-calendar-content"},[n("table",{directives:[{name:"show",rawName:"v-show",value:"date"===e.currentPanel,expression:"currentPanel === 'date'"}],staticClass:"mx-calendar-table"},[n("thead",[n("tr",e._l(e.days,function(t,r){return n("th",{key:r},[e._v(e._s(t))])}))]),e._v(" "),n("tbody",e._l(e.dates,function(t){return n("tr",e._l(t,function(t){return n("td",{class:e.getDateClasses(t),attrs:{title:t.title},on:{click:function(n){e.selectDate(t)}}},[e._v(e._s(t.day))])}))}))]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:"years"===e.currentPanel,expression:"currentPanel === 'years'"}],staticClass:"mx-calendar-year"},e._l(e.years,function(t){return n("a",{class:{current:e.currentYear===t},on:{click:function(n){e.selectYear(t)}}},[e._v(e._s(t))])})),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:"months"===e.currentPanel,expression:"currentPanel === 'months'"}],staticClass:"mx-calendar-month"},e._l(e.months,function(t,r){return n("a",{class:{current:e.currentMonth===r},on:{click:function(t){e.selectMonth(r)}}},[e._v(e._s(t))])})),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:"time"===e.currentPanel,expression:"currentPanel === 'time'"}],staticClass:"mx-calendar-time"},[e.timeSelectOptions.length?n("div",{staticClass:"mx-time-list-wrapper"},[n("ul",{staticClass:"mx-time-list"},e._l(e.timeSelectOptions,function(t){return n("li",{staticClass:"mx-time-item mx-time-picker-item",class:e.getTimeClasses(60*t.value.hours+t.value.minutes,-1),on:{click:function(n){e.pickTime(t.value)}}},[e._v("\n "+e._s(t.label)+"\n ")])}))]):e._l(e.times,function(t,r){return n("div",{key:r,staticClass:"mx-time-list-wrapper",style:{width:100/e.times.length+"%"}},[n("ul",{staticClass:"mx-time-list"},e._l(t,function(t){return n("li",{key:t,staticClass:"mx-time-item",class:e.getTimeClasses(t,r),on:{click:function(n){e.selectTime(t,r)}}},[e._v(e._s(e._f("timeText")(t)))])}))])})],2)])])},i=[],a={render:r,staticRenderFns:i};t.a=a},function(e,t,n){var r=n(12);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(2)("4df51578",r,!0)},function(e,t,n){var r=n(13);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(2)("399f8a4a",r,!0)},function(e,t,n){var r=n(14);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(2)("55c31cbe",r,!0)},function(e,t){e.exports=function(e,t){for(var n=[],r={},i=0;i',range:''}},{exam:{datetime:'\n ',"datetime with time-picker-options":'\n ',"datetime with minute-step":'\n ',"datetime range":'\n '},tips:'if you use the datetime, you should set the format to "YYYY-MM-DD HH:mm:ss" which default is "YYY-MM-DD'},{exam:{"with confirm":'\n ',"datetime with confirm":'\n ',"range width confirm":'\n '},tips:'Recommend to use the confirm option when the type is "datetime" or "range" is true'}].map(function(n){return e("div",{class:"example"},[t.getSource(n.exam),n.tips?e("blockquote",{class:"tips"},[n.tips]):"",t.getPre(n.exam)])})])}})}]); +//# sourceMappingURL=build.js.map \ No newline at end of file diff --git a/demo/build.js.map b/demo/build.js.map new file mode 100644 index 0000000..9b0b051 --- /dev/null +++ b/demo/build.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"Vue\"","webpack:///external \"DatePicker\"","webpack:///./demo/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","Vue","DatePicker","vue__WEBPACK_IMPORTED_MODULE_0___default","a","use","_index__WEBPACK_IMPORTED_MODULE_1___default","el","data","value1","Date","value2","value3","value4","value5","value6","value7","value8","value9","methods","getSource","obj","_this","this","h","$createElement","keys","map","key","class","compile","render","getPre","replace","_this2","attrs","id","exam","base","range","datetime","datetime with time-picker-options","datetime with minute-step","datetime range","tips","with confirm","datetime with confirm","range width confirm"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAjB,GACAY,OAAAC,eAAAb,EAAA,cAAiDkB,OAAA,KAIjDpB,EAAAqB,EAAA,SAAAlB,GACA,IAAAS,EAAAT,KAAAmB,WACA,WAA2B,OAAAnB,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAH,EAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAU,EAAAC,GAAsD,OAAAV,OAAAW,UAAAC,eAAAnB,KAAAgB,EAAAC,IAGtDxB,EAAA2B,EAAA,GAIA3B,IAAA4B,EAAA,mBCnEAzB,EAAAD,QAAA2B,mBCAA1B,EAAAD,QAAA4B,oFCGAC,EAAAC,EAAIC,IAAIC,EAAAF,GAER,IAAID,EAAAC,GACFG,GAAI,OACJC,KAFM,WAGJ,OACEC,OAAQ,IAAIC,KACZC,OAAQ,GACRC,OAAQ,IAAIF,KACZG,OAAQ,GACRC,OAAQ,GACRC,OAAQ,GACRC,OAAQ,GACRC,OAAQ,GACRC,OAAQ,KAGZC,SACEC,UADO,SACIC,GAAK,IAAAC,EAAAC,KAAAC,EAAAD,KAAAE,eACd,OAAOvC,OAAOwC,KAAKL,GAAKM,IAAI,SAAAC,GAC1B,IAAMpC,EAAQ6B,EAAIO,GAClB,OACEJ,EAAA,WAASK,MAAM,WACbL,EAAA,SAAOK,MAAM,UAASD,EAAtB,QACCzB,EAAAC,EAAI0B,QAAQtC,GAAOuC,OAAOpD,KAAK2C,QAKxCU,OAZO,SAYCX,GAAK,IAAAG,EAAAD,KAAAE,eACX,OAAOvC,OAAOwC,KAAKL,GAAKM,IAAI,SAAAC,GAC1B,IAAMpC,EAAQ6B,EAAIO,GAAKK,QAAQ,MAAO,IAAIA,QAAQ,OAAQ,KAC1D,OACET,EAAA,OAAKK,MAAM,QACTL,EAAA,QAAMK,MAAM,kBAAiBrC,UAMvCuC,OAtCM,SAsCEP,GAAG,IAAAU,EAAAX,KA0ET,OACEC,EAAA,OAAAW,OAAKC,GAAG,WAZNC,MA7DFC,KAAQ,kFACRC,MAAS,kEA+DPF,MA5DFG,SAAA,4JAMAC,oCAAA,wSAWAC,4BAAA,uMAQAC,iBAAA,8KAoCEC,KAAM,4GAGNP,MA9BFQ,eAAA,2IAMAC,wBAAA,+KAOAC,sBAAA,6JAkBEH,KAAM,uFAKDjB,IAAI,SAAAN,GAAA,OACPG,EAAA,OAAKK,MAAM,YACRK,EAAKd,UAAUC,EAAIgB,MAElBhB,EAAIuB,KACApB,EAAA,cAAYK,MAAM,SAAQR,EAAIuB,OAC9B,GAELV,EAAKF,OAAOX,EAAIgB","file":"build.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","module.exports = Vue;","module.exports = DatePicker;","import Vue from 'vue'\nimport DatePicker from '@/index'\n\nVue.use(DatePicker)\n\nnew Vue({ // eslint-disable-line\n el: '#app',\n data () {\n return {\n value1: new Date(),\n value2: '',\n value3: new Date(),\n value4: '',\n value5: '',\n value6: '',\n value7: '',\n value8: '',\n value9: ''\n }\n },\n methods: {\n getSource (obj) {\n return Object.keys(obj).map(key => {\n const value = obj[key]\n return (\n
\n \n {Vue.compile(value).render.call(this)}\n
\n )\n })\n },\n getPre (obj) {\n return Object.keys(obj).map(key => {\n const value = obj[key].replace(/\\n/g, '').replace(/\\s+/g, ' ')\n return (\n
\n            {value}\n          
\n )\n })\n }\n },\n render (h) {\n const example1 = {\n 'base': '',\n 'range': ''\n }\n const example2 = {\n 'datetime': `\n `,\n 'datetime with time-picker-options': `\n `,\n 'datetime with minute-step': `\n `,\n 'datetime range': `\n `\n }\n const example3 = {\n 'with confirm': `\n `,\n 'datetime with confirm': `\n `,\n 'range width confirm': `\n `\n }\n const arr = [\n {\n exam: example1\n },\n {\n exam: example2,\n tips: 'if you use the datetime, you should set the format to \"YYYY-MM-DD HH:mm:ss\" which default is \"YYY-MM-DD'\n },\n {\n exam: example3,\n tips: 'Recommend to use the confirm option when the type is \"datetime\" or \"range\" is true'\n }\n ]\n return (\n
\n {arr.map(obj => (\n
\n {this.getSource(obj.exam)}\n {\n obj.tips\n ?
{obj.tips}
\n : ''\n }\n {this.getPre(obj.exam)}\n
\n ))}\n
\n )\n }\n})\n"],"sourceRoot":""} \ No newline at end of file