pzvue-timeline
Version:
vue timeline component
1 lines • 10 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["pz-timeline"]=t():e["pz-timeline"]=t()}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";var i=n(1),r=n(27);i.item=r,i.install=function(e){e.component("timeline",i),e.component("timeline-item",r)},e.exports=i},function(e,t,n){var i,r,o={};n(2),i=n(6),r=n(26),e.exports=i||{},e.exports.__esModule&&(e.exports=e.exports.default);var u="function"==typeof e.exports?e.exports.options||(e.exports.options={}):e.exports;r&&(u.template=r),u.computed||(u.computed={}),Object.keys(o).forEach(function(e){var t=o[e];u.computed[e]=function(){return t}})},function(e,t,n){var i=n(3);"string"==typeof i&&(i=[[e.id,i,""]]);n(5)(i,{});i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(4)(),t.push([e.id,".pz-timeline{width:100%;min-height:100px}.pz-timeline .pz-timeline-item:last-child .pz-timeline-content{min-height:1px}.pz-timeline .pz-timeline-item{position:relative}.pz-timeline .pz-timeline-item .pz-timeline-dot{width:12px;height:12px;border-radius:12px;border:1px solid #000;display:inline-block;top:0;left:0;z-index:2;position:absolute;background-color:#fff}.pz-timeline .pz-timeline-item .pz-timeline-line{width:1px;height:100%;border-left:1px solid #ccc;position:absolute;left:5px;top:0;z-index:1}.pz-timeline .pz-timeline-item .pz-timeline-content{padding:0 20px;position:relative;min-height:50px;top:-3px}.pz-timeline .pz-timeline-item .pz-timeline-content .tl-time{font-weight:700;margin:0;font-size:16px}.pz-timeline .pz-timeline-item .pz-timeline-content .tl-content{line-height:1.8em;padding:10px 6px}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},r=0;r<this.length;r++){var o=this[r][0];"number"==typeof o&&(i[o]=!0)}for(r=0;r<t.length;r++){var u=t[r];"number"==typeof u[0]&&i[u[0]]||(n&&!u[2]?u[2]=n:n&&(u[2]="("+u[2]+") and ("+n+")"),e.push(u))}},e}},function(e,t,n){function i(e,t){for(var n=0;n<e.length;n++){var i=e[n],r=a[i.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](i.parts[o]);for(;o<i.parts.length;o++)r.parts.push(c(i.parts[o],t))}else{for(var u=[],o=0;o<i.parts.length;o++)u.push(c(i.parts[o],t));a[i.id]={id:i.id,refs:1,parts:u}}}}function r(e){for(var t=[],n={},i=0;i<e.length;i++){var r=e[i],o=r[0],u=r[1],s=r[2],c=r[3],f={css:u,media:s,sourceMap:c};n[o]?n[o].parts.push(f):t.push(n[o]={id:o,parts:[f]})}return t}function o(e,t){var n=m(),i=x[x.length-1];if("top"===e.insertAt)i?i.nextSibling?n.insertBefore(t,i.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),x.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function u(e){e.parentNode.removeChild(e);var t=x.indexOf(e);t>=0&&x.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function c(e,t){var n,i,r;if(t.singleton){var o=v++;n=h||(h=s(t)),i=f.bind(null,n,o,!1),r=f.bind(null,n,o,!0)}else n=s(t),i=p.bind(null,n),r=function(){u(n)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else r()}}function f(e,t,n,i){var r=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=y(t,r);else{var o=document.createTextNode(r),u=e.childNodes;u[t]&&e.removeChild(u[t]),u.length?e.insertBefore(o,u[t]):e.appendChild(o)}}function p(e,t){var n=t.css,i=t.media,r=t.sourceMap;if(i&&e.setAttribute("media",i),r&&(n+="\n/*# sourceURL="+r.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var a={},l=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},d=l(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),m=l(function(){return document.head||document.getElementsByTagName("head")[0]}),h=null,v=0,x=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=d()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=r(e);return i(n,t),function(e){for(var o=[],u=0;u<n.length;u++){var s=n[u],c=a[s.id];c.refs--,o.push(c)}if(e){var f=r(e);i(f,t)}for(var u=0;u<o.length;u++){var c=o[u];if(0===c.refs){for(var p=0;p<c.parts.length;p++)c.parts[p]();delete a[c.id]}}}};var y=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),o=i(r);t.default={data:function(){return{state:this.checked}},props:{size:{type:String,default:""},disabled:{type:Boolean,default:!1},checked:{type:Boolean,default:!1}},computed:{checkChoose:function(){return(0,o.default)({"pz-timeline-active":this.state,"pz-timeline-disabled":this.disabled},"pz-timeline-"+this.size,!!this.size)}},mounted:function(){},methods:{change:function(){this.disabled||(this.state=!this.state,this.$emit("change",this.state))}},components:{}}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(8),o=i(r);t.default=function(e,t,n){return t in e?(0,o.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){e.exports={default:n(9),__esModule:!0}},function(e,t,n){n(10);var i=n(13).Object;e.exports=function(e,t,n){return i.defineProperty(e,t,n)}},function(e,t,n){var i=n(11);i(i.S+i.F*!n(21),"Object",{defineProperty:n(17).f})},function(e,t,n){var i=n(12),r=n(13),o=n(14),u=n(16),s="prototype",c=function(e,t,n){var f,p,a,l=e&c.F,d=e&c.G,m=e&c.S,h=e&c.P,v=e&c.B,x=e&c.W,y=d?r:r[t]||(r[t]={}),b=y[s],g=d?i:m?i[t]:(i[t]||{})[s];d&&(n=t);for(f in n)p=!l&&g&&void 0!==g[f],p&&f in y||(a=p?g[f]:n[f],y[f]=d&&"function"!=typeof g[f]?n[f]:v&&p?o(a,i):x&&g[f]==a?function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t[s]=e[s],t}(a):h&&"function"==typeof a?o(Function.call,a):a,h&&((y.virtual||(y.virtual={}))[f]=a,e&c.R&&b&&!b[f]&&u(b,f,a)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){var i=n(15);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var i=n(17),r=n(25);e.exports=n(21)?function(e,t,n){return i.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var i=n(18),r=n(20),o=n(24),u=Object.defineProperty;t.f=n(21)?Object.defineProperty:function(e,t,n){if(i(e),t=o(t,!0),i(n),r)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var i=n(19);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(21)&&!n(22)(function(){return 7!=Object.defineProperty(n(23)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){e.exports=!n(22)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var i=n(19),r=n(12).document,o=i(r)&&i(r.createElement);e.exports=function(e){return o?r.createElement(e):{}}},function(e,t,n){var i=n(19);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports=" <ul class=pz-timeline> <slot></slot> </ul> "},function(e,t,n){var i,r,o={};n(28),i=n(30),r=n(31),e.exports=i||{},e.exports.__esModule&&(e.exports=e.exports.default);var u="function"==typeof e.exports?e.exports.options||(e.exports.options={}):e.exports;r&&(u.template=r),u.computed||(u.computed={}),Object.keys(o).forEach(function(e){var t=o[e];u.computed[e]=function(){return t}})},function(e,t,n){var i=n(29);"string"==typeof i&&(i=[[e.id,i,""]]);n(5)(i,{});i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(4)(),t.push([e.id,"",""])},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{state:this.checked}},props:{color:{type:String,default:"blue"}},computed:{borderColor:function(){return{"border-color":this.color}}},mounted:function(){},methods:{},components:{}}},function(e,t){e.exports=" <li class=pz-timeline-item> <div class=pz-timeline-dot :style=borderColor></div> <div class=pz-timeline-line></div> <div class=pz-timeline-content> <slot></slot> </div> </li> "}])});