m2-ui
Version:
The package is provided web components and utilities based on vue and element-ui.
6 lines • 2.77 kB
JavaScript
/*!
* m2-ui v1.0.0
* (c) 2020 by Miracle He
* Released under the MIT License.
*/
module.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=38)}({0:function(t,e,n){"use strict";function i(t,e,n,i,r,o,s,a){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),s?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=c):r&&(c=a?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return i}))},38:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"m2-tab-bar-item",on:{click:this.itemClick}},[this.isActive?e("div",{staticClass:"item-icon-active"},[this._t("item-icon-active")],2):e("div",{staticClass:"item-icon"},[this._t("item-icon")],2),e("div",{staticClass:"icon-text",style:this.activeStyle},[this._t("item-text")],2)])};i._withStripped=!0;var r={name:"m2-tab-bar-item",props:{path:{type:String,required:!0},activeColor:{type:String,default:"#ff5777"}},computed:{isActive:function(){return this.$route.path.startsWith(this.path)},activeStyle:function(){return this.isActive?{color:this.activeColor}:""}},methods:{itemClick:function(){this.$router.replace(this.path)}}},o=n(0),s=Object(o.a)(r,i,[],!1,null,null,null);s.options.__file="packages/tab-bar-item/src/main.vue";var a=s.exports;a.install=function(t){t.component(a.name,a)};e.default=a}});