UNPKG

5.1 kBJavaScriptView Raw
1module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,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="/dist/",t(t.s=255)}({0:function(e,t){e.exports=function(e,t,n,r,o,i){var a,s=e=e||{},c=typeof e.default;"object"!==c&&"function"!==c||(a=e,s=e.default);var l="function"==typeof s?s.options:s;t&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0),n&&(l.functional=!0),o&&(l._scopeId=o);var u;if(i?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},l._ssrRegister=u):r&&(u=r),u){var d=l.functional,p=d?l.render:l.beforeCreate;d?(l._injectStyles=u,l.render=function(e,t){return u.call(t),p(e,t)}):l.beforeCreate=p?[].concat(p,u):[u]}return{esModule:a,exports:s,options:l}}},114:function(e,t,n){"use strict";t.a={name:"Accordion",componentName:"Accordion",props:{mutex:{type:Boolean,default:!0}},data:function(){return{value:[]}},methods:{open:function(e){this.mutex?this.value=this.value[0]===e?[]:[e]:-1===this.value.indexOf(e)?this.value.push(e):this.close(e)},close:function(e){this.value=this.value.filter(function(t){return t!==e})}}}},115:function(e,t,n){"use strict";var r=n(4);t.a={name:"AccordionItem",componentName:"AccordionItem",components:{Arrow:r.a},props:{open:{type:Boolean},title:{type:String},name:{type:String,default:function(){return Math.random().toString(36).substr(2)}}},watch:{open:function(e){e?this.$parent.open(this.name):this.$parent.close(this.name)}},beforeMount:function(){this.open&&this.$parent.open(this.name)},mounted:function(){this.handleResize(),window.addEventListener("resize",this.handleResize,!1)},beforeDestroy:function(){window.removeEventListener("resize",this.handleResize)},methods:{handleResize:function(){if(this.$parent.value.indexOf(this.name)>-1){var e=this.$el.querySelector(".vx-accordion--item-bd");this.handleEnter(e)}},handleEnter:function(e){requestAnimationFrame(function(){e.style.height=e.children[0].offsetHeight+"px"})},handleOpen:function(){this.$parent.open(this.name)}}}},216:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(217),o=n(219);n.d(t,"Accordion",function(){return r.a}),n.d(t,"AccordionItem",function(){return o.a})},217:function(e,t,n){"use strict";var r=n(114),o=n(218),i=n(0),a=i(r.a,o.a,!1,null,null,null);t.a=a.exports},218:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{class:["vx-accordion"]},[e._t("default")],2)},o=[],i={render:r,staticRenderFns:o};t.a=i},219:function(e,t,n){"use strict";var r=n(115),o=n(220),i=n(0),a=i(r.a,o.a,!1,null,null,null);t.a=a.exports},220:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:["vx-accordion--item",{"is-open":e.$parent.value.indexOf(e.name)>-1}]},[n("div",{staticClass:"vx-accordion--item-hd",on:{click:e.handleOpen}},[n("div",{staticClass:"vx-accordion--item-title"},[e.$slots.title?e._t("default"):[e._v("\n "+e._s(e.title)+"\n ")]],2),n("arrow",{attrs:{direction:"down"}})],1),n("transition",{attrs:{name:"accordion-slide"},on:{enter:e.handleEnter}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.$parent.value.indexOf(e.name)>-1,expression:"$parent.value.indexOf(name) > -1"}],staticClass:"vx-accordion--item-bd"},[n("div",{staticClass:"vx-accordion--item-content"},[e._t("default")],2)])])],1)},o=[],i={render:r,staticRenderFns:o};t.a=i},255:function(e,t,n){e.exports=n(216)},3:function(e,t,n){"use strict";t.a={name:"Arrow",componentName:"Arrow",functional:!0,props:{direction:{type:String,default:"right"},size:{type:String,default:"0.18rem"},color:{type:String,default:"rgba(153, 153, 153, 0.6)"},tag:{type:String,default:"i"}}}},4:function(e,t,n){"use strict";var r=n(3),o=n(9),i=n(0),a=i(r.a,o.a,!0,null,null,null);t.a=a.exports},9:function(e,t,n){"use strict";var r=function(e,t){return(0,t._c)(t.props.tag,t._g(t._b({tag:"component",class:["vx-arrow",t.data.staticClass,t.data.class],style:[Object.assign({display:"inline-block",borderWidth:"1px",borderStyle:"solid",verticalAlign:"middle",boxSizing:"border-box",transform:"rotate(45deg)",height:t.props.size,width:t.props.size,borderColor:{up:t.props.color+" transparent transparent "+t.props.color,right:t.props.color+" "+t.props.color+" transparent transparent",down:"transparent "+t.props.color+" "+t.props.color+" transparent",left:"transparent transparent "+t.props.color+" "+t.props.color}[t.props.direction]},t.data.style)]},"component",t.data.attrs,!1),t.listeners))},o=[],i={render:r,staticRenderFns:o};t.a=i}});
\No newline at end of file