m2-ui
Version:
The package is provided web components and utilities based on vue and element-ui.
6 lines • 3.24 kB
JavaScript
/*!
* m2-ui v1.0.0
* (c) 2020 by Miracle He
* Released under the MIT License.
*/
module.exports=function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="/dist/",o(o.s=42)}({0:function(t,e,o){"use strict";function n(t,e,o,n,r,s,i,a){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=o,u._compiled=!0),n&&(u.functional=!0),s&&(u._scopeId="data-v-"+s),i?(l=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(i)},u._ssrRegister=l):r&&(l=a?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var d=u.render;u.render=function(t,e){return l.call(e),d(t,e)}}else{var c=u.beforeCreate;u.beforeCreate=c?[].concat(c,l):[l]}return{exports:t,options:u}}o.d(e,"a",(function(){return n}))},3:function(t,e){t.exports=require("m2-core")},42:function(t,e,o){"use strict";o.r(e);var n=o(3),r={name:"m2-slot-loader",props:{slot:{type:Object,required:!0},src:{type:String},data:Object},created:function(){this.loadComponent()},computed:{slotId:function(){return this.slot?this.slot.id:""}},methods:{loadComponent:function(){var t=this.$emit("load",{slot:this.slot,path:this.parseSlot()});t&&(this.$options.components[this.slotId]=t)},parseSlot:function(){var t="";return-1!==this.slotId.indexOf(".")&&(t=this.slotId.split(".")[0]+"/"),t+=t.toLowerCase()+this.slotId,this.slot.default&&(t+="/index"),t.replace(/\//g,"/")}},render:function(t){var e=this,o=this.slot,r=o.props,s=o.api,i=o.modules,a=o.extra;return this.$set(this.slot,"props",r||{}),s&&this.$set(this.slot,"api",s),i&&(this.$set(this.slot,"modules",i),Object.keys(i).forEach((function(t){var o=i[t],r=o.fields;if(r){var l=void 0;n.DataType.isArray(r)&&(1===r.length&&"*"===r[0]?(l=e.data,s&&e.$set(o,"api",s)):(l={},r.forEach((function(t){e.data?e.$set(l,t,e.data[t]):a&&e.$set(l,t,a[t])}))),e.$set(o,"extra",l))}}))),this.data?this.$set(r,"payload",this.data):a&&this.$set(r,"payload",a),s&&this.$set(r,"api",s),t(this.slotId,{props:r,on:this.$listeners})}},s=o(0),i=Object(s.a)(r,void 0,void 0,!1,null,null,null);i.options.__file="packages/slot-loader/src/main.vue";var a=i.exports;a.install=function(t){t.component(a.name,a)};e.default=a}});