UNPKG

@cw-devops/bk-magic-vue

Version:

基于蓝鲸 Magicbox 和 Vue 的前端组件库

839 lines (786 loc) 28.5 kB
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = global || self, factory(global.library = {})); }(this, function (exports) { 'use strict'; function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}var normalMerge=["attrs","props","domProps"],toArrayMerge=["class","style","directives"],functionalMerge=["on","nativeOn"],mergeJsxProps=function(a){return a.reduce(function(c,a){for(var b in a)if(!c[b])c[b]=a[b];else if(-1!==normalMerge.indexOf(b))c[b]=_extends({},c[b],a[b]);else if(-1!==toArrayMerge.indexOf(b)){var d=c[b]instanceof Array?c[b]:[c[b]],e=a[b]instanceof Array?a[b]:[a[b]];c[b]=d.concat(e);}else if(-1!==functionalMerge.indexOf(b)){for(var f in a[b])if(c[b][f]){var g=c[b][f]instanceof Array?c[b][f]:[c[b][f]],h=a[b][f]instanceof Array?a[b][f]:[a[b][f]];c[b][f]=g.concat(h);}else c[b][f]=a[b][f];}else if("hook"==b)for(var i in a[b])c[b][i]=c[b][i]?mergeFn(c[b][i],a[b][i]):a[b][i];else c[b]=a[b];return c},{})},mergeFn=function(a,b){return function(){a&&a.apply(this,arguments),b&&b.apply(this,arguments);}};var helper=mergeJsxProps; function isVNode(node) { return node && _typeof(node) === 'object' && node.hasOwnProperty('componentOptions'); } var requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) { window.setTimeout(callback, 1000 / 60); }; var cancelAnimationFrame = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame || function (id) { window.clearTimeout(id); }; var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g; var MOZ_HACK_REGEXP = /^moz([A-Z])/; var camelCase = function camelCase(name) { return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) { return offset ? letter.toUpperCase() : letter; }).replace(MOZ_HACK_REGEXP, 'Moz$1'); }; var getStyle = Number(document.documentMode) < 9 ? function (element, styleName) { if (!element || !styleName) return null; styleName = camelCase(styleName); if (styleName === 'float') { styleName = 'styleFloat'; } try { switch (styleName) { case 'opacity': try { return element.filters.item('alpha').opacity / 100; } catch (e) { return 1.0; } default: return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null; } } catch (e) { return element.style[styleName]; } } : function (element, styleName) { if (!element || !styleName) return null; styleName = camelCase(styleName); if (styleName === 'float') { styleName = 'cssFloat'; } try { var computed = document.defaultView.getComputedStyle(element, ''); return element.style[styleName] || computed ? computed[styleName] : null; } catch (e) { return element.style[styleName]; } }; var script = { name: 'bk-process', components: { SpinLoading: { functional: true, render: function render(h, ctx) { return h("div", helper([{ "class": "bk-spin-loading bk-spin-loading-mini" }, { class: ctx.props.themeClass }]), [h("div", { "class": "rotate rotate1" }), h("div", { "class": "rotate rotate2" }), h("div", { "class": "rotate rotate3" }), h("div", { "class": "rotate rotate4" }), h("div", { "class": "rotate rotate5" }), h("div", { "class": "rotate rotate6" }), h("div", { "class": "rotate rotate7" }), h("div", { "class": "rotate rotate8" })]); } }, VNodeContent: { functional: true, render: function render(h, ctx) { return h("div", { "class": "step-item-custom" }, [ctx.props.content, ctx.children]); } }, StepStatusIcon: { functional: true, render: function render(h, ctx) { return ctx.props.icon; } } }, props: { list: { type: Array, required: true }, controllable: { type: Boolean, default: false }, showSteps: { type: Boolean, default: false }, curProcess: { type: Number, default: 0 }, displayKey: { type: String, required: true }, extCls: { type: String, default: '' } }, data: function data() { return { toggleFlag: false, showFlag: this.showSteps, dataList: this.list, controllables: this.controllable, paddingBottom: 0, maxBottom: 0, stepsClientHeight: 32 }; }, computed: { hasStepChangeEvent: function hasStepChangeEvent() { return !!(this.$listeners || {})['step-change']; } }, watch: { list: { handler: function handler(value) { this.initToggleFlag(value); this.dataList = _toConsumableArray(value); this.calculateMaxBottom(value); }, deep: true }, curProcess: function curProcess(newValue, oldValue) { if (newValue > this.list.length + 1) { return; } this.setParentProcessLoad(this.list); } }, created: function created() { this.setParentProcessLoad(this.list); }, mounted: function mounted() { this.initToggleFlag(this.list); this.calculateMaxBottom(this.list); if (this.showFlag) { this.paddingBottom = this.maxBottom; } else { this.paddingBottom = 0; } }, methods: { initToggleFlag: function initToggleFlag(list) { if (!list.length) { this.toggleFlag = false; } else { for (var i = 0; i < list.length; i++) { if (list[i].steps && list[i].steps.length) { this.toggleFlag = true; break; } } } }, setParentProcessLoad: function setParentProcessLoad(list) { var _this$list; var dataList = _toConsumableArray(list); var curProcess = this.curProcess - 1 || 0; if (!dataList.length) { return; } if (curProcess === dataList.length) { this.$set(dataList[curProcess - 1], 'isLoading', false); } else { for (var i = 0; i < dataList.length; i++) { var loadFlag = false; if (dataList[curProcess].steps && dataList[curProcess].steps.length) { var steps = dataList[curProcess].steps; loadFlag = steps.some(function (item) { return item.isLoading; }); if (loadFlag) { if (curProcess > 0) { this.$set(dataList[curProcess - 1], 'isLoading', false); } this.$set(dataList[curProcess], 'isLoading', true); } } } } (_this$list = this.list).splice.apply(_this$list, [0, this.list.length].concat(_toConsumableArray(dataList))); }, toggleProcess: function toggleProcess() { this.showFlag = !this.showFlag; if (this.showFlag) { this.paddingBottom = this.maxBottom; } else { this.paddingBottom = 0; } }, calculateMaxBottom: function calculateMaxBottom(list) { var processList = _toConsumableArray(list); var stepsLengthList = []; if (!processList.length) { this.maxBottom = 0; return; } processList.forEach(function (item) { if (item.steps) { stepsLengthList.push(item.steps.length); } }); this.maxBottom = Math.max.apply(null, stepsLengthList) * this.stepsClientHeight; }, toggle: function toggle(item, index) { if (!this.controllables) { return; } this.$emit('update:curProcess', index + 1); this.$emit('process-changed', index + 1, item); }, toggleStepItem: function toggleStepItem(step, stepIndex, processIndex) { this.$emit('step-change', step, stepIndex, processIndex); }, isCurrent: function isCurrent(index) { return this.curProcess === index + 1; }, isDone: function isDone(index) { return this.curProcess >= index + 1; }, isBuiltinIcon: function isBuiltinIcon(icon) { return typeof icon === 'string' && !!icon; }, isLoadingStatus: function isLoadingStatus(item) { return item.status === 'loading'; }, isErrorStatus: function isErrorStatus(item) { return item.status === 'error'; }, isDoneStatus: function isDoneStatus(item) { return item.status === 'done'; }, isDefaultStatus: function isDefaultStatus(item) { return item.status === 'default'; }, isVNode: function isVNode$1(content) { return isVNode(content); }, getStepStatusIcon: function getStepStatusIcon(step) { var h = this.$createElement; var customIcon = h("i", { "class": ['bk-icon', "icon-".concat(step.statusIcon)] }); var loadingIcon = h("spin-loading", { "attrs": { "theme-class": "bk-spin-loading-primary steps-loading" } }); var errorIcon = h("i", { "class": "bk-icon icon-close error" }); var doneIcon = h("i", { "class": "bk-icon icon-check-1 done" }); if (this.isBuiltinIcon(step.statusIcon)) return customIcon; if (this.isLoadingStatus(step)) return loadingIcon; if (this.isErrorStatus(step)) return errorIcon; if (this.isDoneStatus(step)) return doneIcon; } } }; function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier , shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { if (typeof shadowMode !== 'boolean') { createInjectorSSR = createInjector; createInjector = shadowMode; shadowMode = false; } var options = typeof script === 'function' ? script.options : script; if (template && template.render) { options.render = template.render; options.staticRenderFns = template.staticRenderFns; options._compiled = true; if (isFunctionalTemplate) { options.functional = true; } } if (scopeId) { options._scopeId = scopeId; } var hook; if (moduleIdentifier) { hook = function hook(context) { context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__; } if (style) { style.call(this, createInjectorSSR(context)); } if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier); } }; options._ssrRegister = hook; } else if (style) { hook = shadowMode ? function () { style.call(this, createInjectorShadow(this.$root.$options.shadowRoot)); } : function (context) { style.call(this, createInjector(context)); }; } if (hook) { if (options.functional) { var originalRender = options.render; options.render = function renderWithStyleInjection(h, context) { hook.call(context); return originalRender(h, context); }; } else { var existing = options.beforeCreate; options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; } } return script; } var normalizeComponent_1 = normalizeComponent; /* script */ var __vue_script__ = script; /* template */ var __vue_render__ = function __vue_render__() { var _vm = this; var _h = _vm.$createElement; var _c = _vm._self._c || _h; return _c('div', { staticClass: "bk-process", class: _vm.extCls }, [_c('ul', { style: { paddingBottom: _vm.paddingBottom + 'px' } }, _vm._l(_vm.dataList, function (item, index) { return _c('li', { key: index, class: { success: _vm.isDone(index), current: item.isLoading && _vm.isCurrent(index) || item.status && _vm.isCurrent(index), 'status-error': _vm.isErrorStatus(item), 'status-done': _vm.isDoneStatus(item), 'status-loading': _vm.isLoadingStatus(item), 'status-default': _vm.isDefaultStatus(item) }, style: { cursor: _vm.controllables ? 'pointer' : '' }, on: { "click": function click($event) { _vm.toggle(item, index); } } }, [_c('div', { staticClass: "bk-process-item", style: { cursor: _vm.hasStepChangeEvent ? 'pointer' : '' }, on: { "click": function click($event) { _vm.toggleStepItem(item, null, index); } } }, [_vm._v("\n " + _vm._s(item[_vm.displayKey]) + "\n "), item.status ? [_vm.isBuiltinIcon(item.statusIcon) ? _c('i', { class: ['bk-icon', "icon-" + item.statusIcon] }) : _vm.isLoadingStatus(item) ? _c('spin-loading', { attrs: { "theme-class": "bk-spin-loading-white" } }) : _vm.isErrorStatus(item) ? _c('i', { staticClass: "bk-icon icon-close-circle" }) : _vm.isDoneStatus(item) ? _c('i', { staticClass: "bk-icon icon-check-circle" }) : _vm._e()] : [item.isLoading && _vm.isCurrent(index) ? _c('spin-loading', { attrs: { "theme-class": "bk-spin-loading-white" } }) : item.status !== false ? _c('i', { staticClass: "bk-icon icon-check-circle" }) : _vm._e()]], 2), _c('dl', { directives: [{ name: "show", rawName: "v-show", value: item.steps && item.steps.length && _vm.showFlag, expression: "item.steps && item.steps.length && showFlag" }], ref: "stepsDom", refInFor: true, staticClass: "bk-process-step" }, _vm._l(item.steps, function (step, stepIndex) { return _c('dd', { key: stepIndex, class: ['step-item', { done: _vm.isDoneStatus(step), error: _vm.isErrorStatus(step), loading: _vm.isLoadingStatus(item) }], style: { cursor: _vm.hasStepChangeEvent ? 'pointer' : '' }, on: { "click": function click($event) { _vm.toggleStepItem(step, stepIndex, index); } } }, [_vm.isVNode(step[_vm.displayKey]) ? _c('v-node-content', { attrs: { "content": step[_vm.displayKey] } }, [_c('step-status-icon', { attrs: { "icon": _vm.getStepStatusIcon(step) } })], 1) : [_vm._v("\n " + _vm._s(step[_vm.displayKey]) + "\n "), step.status ? _c('step-status-icon', { attrs: { "icon": _vm.getStepStatusIcon(step) } }) : [step.isLoading && _vm.isCurrent(index) ? _c('spin-loading', { attrs: { "theme-class": "bk-spin-loading-primary steps-loading" } }) : step.status !== false ? _c('i', { staticClass: "bk-icon icon-check-1" }) : _vm._e()]]], 2); }), 0)]); }), 0), _vm.toggleFlag ? _c('a', { staticClass: "bk-process-toggle", attrs: { "href": "javascript:;" }, on: { "click": _vm.toggleProcess } }, [_c('i', { staticClass: "bk-icon", class: _vm.showFlag ? 'icon-angle-up' : 'icon-angle-down' })]) : _vm._e()]); }; var __vue_staticRenderFns__ = []; /* style */ var __vue_inject_styles__ = undefined; /* scoped */ var __vue_scope_id__ = undefined; /* module identifier */ var __vue_module_identifier__ = undefined; /* functional template */ var __vue_is_functional_template__ = false; /* style inject */ /* style inject SSR */ /* style inject shadow dom */ var __vue_component__ = /*#__PURE__*/normalizeComponent_1({ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined); var _defined = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; var _toObject = function (it) { return Object(_defined(it)); }; var hasOwnProperty = {}.hasOwnProperty; var _has = function (it, key) { return hasOwnProperty.call(it, key); }; var toString = {}.toString; var _cof = function (it) { return toString.call(it).slice(8, -1); }; var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return _cof(it) == 'String' ? it.split('') : Object(it); }; var _toIobject = function (it) { return _iobject(_defined(it)); }; var ceil = Math.ceil; var floor = Math.floor; var _toInteger = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; var min = Math.min; var _toLength = function (it) { return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; }; var max = Math.max; var min$1 = Math.min; var _toAbsoluteIndex = function (index, length) { index = _toInteger(index); return index < 0 ? max(index + length, 0) : min$1(index, length); }; var _arrayIncludes = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = _toIobject($this); var length = _toLength(O.length); var index = _toAbsoluteIndex(fromIndex, length); var value; if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; if (value != value) return true; } else for (;length > index; index++) if (IS_INCLUDES || index in O) { if (O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; function createCommonjsModule(fn, module) { return module = { exports: {} }, fn(module, module.exports), module.exports; } var _core = createCommonjsModule(function (module) { var core = module.exports = { version: '2.6.12' }; if (typeof __e == 'number') __e = core; }); var _core_1 = _core.version; var _global = createCommonjsModule(function (module) { var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); if (typeof __g == 'number') __g = global; }); var _shared = createCommonjsModule(function (module) { var SHARED = '__core-js_shared__'; var store = _global[SHARED] || (_global[SHARED] = {}); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: _core.version, mode: 'pure' , copyright: '© 2020 Denis Pushkarev (zloirock.ru)' }); }); var id = 0; var px = Math.random(); var _uid = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; var shared = _shared('keys'); var _sharedKey = function (key) { return shared[key] || (shared[key] = _uid(key)); }; var arrayIndexOf = _arrayIncludes(false); var IE_PROTO = _sharedKey('IE_PROTO'); var _objectKeysInternal = function (object, names) { var O = _toIobject(object); var i = 0; var result = []; var key; for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key); while (names.length > i) if (_has(O, key = names[i++])) { ~arrayIndexOf(result, key) || result.push(key); } return result; }; var _enumBugKeys = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); var _objectKeys = Object.keys || function keys(O) { return _objectKeysInternal(O, _enumBugKeys); }; var _aFunction = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; var _ctx = function (fn, that, length) { _aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function () { return fn.apply(that, arguments); }; }; var _isObject = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; var _anObject = function (it) { if (!_isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; var _fails = function (exec) { try { return !!exec(); } catch (e) { return true; } }; var _descriptors = !_fails(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); var document$1 = _global.document; var is = _isObject(document$1) && _isObject(document$1.createElement); var _domCreate = function (it) { return is ? document$1.createElement(it) : {}; }; var _ie8DomDefine = !_descriptors && !_fails(function () { return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7; }); var _toPrimitive = function (it, S) { if (!_isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; var dP = Object.defineProperty; var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) { _anObject(O); P = _toPrimitive(P, true); _anObject(Attributes); if (_ie8DomDefine) try { return dP(O, P, Attributes); } catch (e) { } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; var _objectDp = { f: f }; var _propertyDesc = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; var _hide = _descriptors ? function (object, key, value) { return _objectDp.f(object, key, _propertyDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var IS_WRAP = type & $export.W; var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {}); var expProto = exports[PROTOTYPE]; var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] : (_global[name] || {})[PROTOTYPE]; var key, own, out; if (IS_GLOBAL) source = name; for (key in source) { own = !IS_FORCED && target && target[key] !== undefined; if (own && _has(exports, key)) continue; out = own ? target[key] : source[key]; exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] : IS_BIND && own ? _ctx(out, _global) : IS_WRAP && target[key] == out ? (function (C) { var F = function (a, b, c) { if (this instanceof C) { switch (arguments.length) { case 0: return new C(); case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; })(out) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out; if (IS_PROTO) { (exports.virtual || (exports.virtual = {}))[key] = out; if (type & $export.R && expProto && !expProto[key]) _hide(expProto, key, out); } } }; $export.F = 1; $export.G = 2; $export.S = 4; $export.P = 8; $export.B = 16; $export.W = 32; $export.U = 64; $export.R = 128; var _export = $export; var _objectSap = function (KEY, exec) { var fn = (_core.Object || {})[KEY] || Object[KEY]; var exp = {}; exp[KEY] = exec(fn); _export(_export.S + _export.F * _fails(function () { fn(1); }), 'Object', exp); }; _objectSap('keys', function () { return function keys(it) { return _objectKeys(_toObject(it)); }; }); var keys = _core.Object.keys; var keys$1 = keys; function setInstaller (component, afterInstall) { component.install = function (Vue) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var props = component.props || {}; keys$1(options).forEach(function (key) { if (props.hasOwnProperty(key)) { if (typeof props[key] === 'function' || props[key] instanceof Array) { props[key] = { type: props[key], default: options[key] }; } else { props[key].default = options[key]; } } }); component.name = options.namespace ? component.name.replace('bk', options.namespace) : component.name; Vue.component(component.name, component); typeof afterInstall === 'function' && afterInstall(Vue, options); }; } setInstaller(__vue_component__); exports.default = __vue_component__; Object.defineProperty(exports, '__esModule', { value: true }); }));