w-ui
Version:
A Vue.js 2.0 UI Toolkit for mobile
1 lines • 3.15 kB
JavaScript
module.exports=function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=68)}({0:function(t,e){t.exports=function(t,e,n,i,o,r){var s,c=t=t||{},u=typeof t.default;"object"!==u&&"function"!==u||(s=t,c=t.default);var a="function"==typeof c?c.options:c;e&&(a.render=e.render,a.staticRenderFns=e.staticRenderFns,a._compiled=!0),n&&(a.functional=!0),o&&(a._scopeId=o);var l;if(r?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},a._ssrRegister=l):i&&(l=i),l){var d=a.functional,f=d?a.render:a.beforeCreate;d?(a._injectStyles=l,a.render=function(t,e){return l.call(e),f(t,e)}):a.beforeCreate=f?[].concat(f,l):[l]}return{esModule:s,exports:c,options:a}}},68:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccordionItem=void 0;var i=n(69),o=function(t){return t&&t.__esModule?t:{default:t}}(i);e.AccordionItem=o.default},69:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),o=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,function(){return i[t]})}(r);var s=n(70),c=n(0),u=c(o.a,s.a,!1,null,null,null);u.options.__file="packages/accordion-item/src/AccordionItem.vue",e.default=u.exports},70:function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"w-accordion-title",on:{click:t.toggle}},[t.$slots.title?n("span",[t._t("title")],2):n("span",[t._v(t._s(t.title))]),t._v(" "),n("i",{class:t.show?"accordion-rotated":""})]),t._v(" "),n("div",{staticClass:"w-accordion-content",style:t.styleHeight},[n("div",{ref:"content"},[t._t("default")],2)])])},o=[];i._withStripped=!0;var r={render:i,staticRenderFns:o};e.a=r},9:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"w-accordion-item",data:function(){return{show:this.open,height:0,styleHeight:{height:0}}},props:{title:String,open:{type:Boolean,default:!1}},watch:{open:function(t){t?this.$parent.open(this._uid):this.closeItem()}},methods:{toggle:function(){this.$parent.open(this._uid)},openItem:function(){var t=this;this.$parent.opening=!0,this.styleHeight={height:this.$refs.content.offsetHeight+"px"},setTimeout(function(){t.styleHeight={},t.$parent.opening=!1},200),this.show=!0},closeItem:function(){var t=this;void 0===this.styleHeight.height?(this.styleHeight={height:this.$refs.content.offsetHeight+"px"},setTimeout(function(){t.styleHeight={height:0}},50)):this.styleHeight={height:0},this.show=!1}},mounted:function(){var t=this;this.$nextTick(function(){t.open&&t.openItem()})}}}});