@cw-devops/bk-magic-vue
Version:
基于蓝鲸 Magicbox 和 Vue 的前端组件库
904 lines (843 loc) • 27.3 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) :
(global = global || self, factory(global.library = {}, global.Vue));
}(this, function (exports, Vue) { 'use strict';
Vue = Vue && Vue.hasOwnProperty('default') ? Vue['default'] : Vue;
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 _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
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 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];
}
};
_export(_export.S, 'Number', {
isNaN: function isNaN(number) {
return number != number;
}
});
var isNan = _core.Number.isNaN;
var isNan$1 = isNan;
_export(_export.S + _export.F * !_descriptors, 'Object', { defineProperty: _objectDp.f });
var $Object = _core.Object;
var defineProperty = function defineProperty(it, key, desc) {
return $Object.defineProperty(it, key, desc);
};
var defineProperty$1 = defineProperty;
var hasInitZIndex = false;
var zIndex;
(function () {
if (!window['__bk_zIndex_manager']) {
var zIndexManager = {
nextZIndex: function nextZIndex() {
var zIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';
return zIndex === 'default' ? zIndexManager.zIndex++ : zIndex;
},
nextTickIndex: function nextTickIndex() {
var tick = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
var zIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
if (zIndex === 'default') {
zIndexManager.zIndex += tick;
return zIndexManager.zIndex;
}
return zIndex;
}
};
defineProperty$1(zIndexManager, 'zIndex', {
configurable: true,
get: function get() {
if (!hasInitZIndex) {
zIndex = zIndex || (Vue.prototype.$BK_EL || {}).zIndex || 2000;
hasInitZIndex = true;
}
return zIndex;
},
set: function set(value) {
zIndex = value;
}
});
window['__bk_zIndex_manager'] = zIndexManager;
}
})();
var zIndexManager = window['__bk_zIndex_manager'];
var script = {
name: 'bk-loading',
props: {
isLoading: {
type: Boolean,
default: false
},
title: {
type: [String, Object],
default: ''
},
mode: {
type: String,
default: 'normal'
},
size: {
type: String,
default: 'large'
},
theme: {
type: String,
default: 'colorful'
},
delay: {
type: Number,
default: 0
},
immediate: {
type: Boolean,
default: false
},
opacity: {
type: Number,
default: 0.9
},
color: {
type: String,
default: '#ffffff'
},
zIndex: {
type: Number
},
afterLeave: {
type: Function
},
extCls: {
type: String,
default: ''
},
type: {
type: String,
default: 'default'
}
},
data: function data() {
return {
timer: 0,
hide: false,
duration: 500,
isShow: false
};
},
computed: {
isSpin: function isSpin() {
return this.mode === 'spin';
},
bgColor: function bgColor() {
var color = this.color.replace(/\s/gm, '');
if (/^#([A-Fa-f0-9]{3}){1,2}$/.test(color)) {
var colors = color.substring(1).split('');
if (colors.length === 3) {
colors = [colors[0], colors[0], colors[1], colors[1], colors[2], colors[2]];
}
colors = '0x' + colors.join('');
return 'rgba(' + [colors >> 16 & 255, colors >> 8 & 255, colors & 255].join(',') + ",".concat(this.opacity, ")");
} else if (/^rgba?\(([^\)]+)\)/.test(color)) {
return color.replace(/^rgb\(([^\)]+)\)/, "rgba($1,".concat(this.opacity, ")"));
}
return this.color;
},
computedClass: function computedClass() {
return this.isSpin ? "bk-spin-loading bk-spin-loading-".concat(this.size, " bk-spin-loading-").concat(this.theme) : "bk-loading1 bk-".concat(this.theme, " bk-size-").concat(this.size);
},
hasZIndexOption: function hasZIndexOption() {
if (this.type === 'fixed') {
return;
}
return typeof this.zIndex === 'number' && !isNan$1(this.zIndex);
},
renderZIndex: {
get: function get() {
return this.zIndex;
},
set: function set() {}
}
},
watch: {
hide: function hide(newVal) {
var _this = this;
if (newVal) {
var delay = isNaN(this.delay) ? 0 : Number(this.delay);
clearTimeout(this.timer);
if (delay > 0) {
this.timer = setTimeout(function () {
_this.hideLoading();
}, delay);
} else {
this.hideLoading();
}
}
},
isShow: function isShow(newVal) {
if (newVal && !this.hasZIndexOption) {
this.renderZIndex = zIndexManager.nextZIndex();
}
},
isLoading: {
handler: function handler(newVal) {
if (this.type === 'default') {
if (newVal) {
this.isShow = newVal;
} else {
this.hide = true;
}
}
},
immediate: true
}
},
mounted: function mounted() {
this.hide = false;
},
methods: {
hideLoading: function hideLoading() {
this.isShow = false;
this.$el.addEventListener('transitionend', this.destroyEl);
},
destroyEl: function destroyEl() {
this.$el.removeEventListener('transitionend', this.destroyEl);
this.$destroy();
this.$el.parentNode.removeChild(this.$el);
},
animationFinish: function animationFinish() {
if (this.afterLeave && typeof this.afterLeave === 'function') {
this.afterLeave();
}
}
}
};
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 _vm.type === 'default' ? _c('div', {
staticClass: "bk-loading bk-default-loading",
class: _vm.extCls,
style: {
position: 'relative'
}
}, [_c('div', {
staticClass: "bk-loading-body"
}, [_vm._t("default")], 2), _c('transition', {
attrs: {
"name": "fade",
"duration": {
enter: _vm.duration
}
},
on: {
"after-leave": _vm.animationFinish
}
}, [_c('div', {
directives: [{
name: "show",
rawName: "v-show",
value: _vm.isShow,
expression: "isShow"
}],
staticClass: "bk-loading-wrapper",
style: {
renderZIndex: _vm.renderZIndex,
backgroundColor: _vm.bgColor
}
}, [_c('div', {
class: _vm.computedClass
}, [_vm.isSpin ? [_c('div', {
staticClass: "rotate rotate1"
}), _c('div', {
staticClass: "rotate rotate2"
}), _c('div', {
staticClass: "rotate rotate3"
}), _c('div', {
staticClass: "rotate rotate4"
}), _c('div', {
staticClass: "rotate rotate5"
}), _c('div', {
staticClass: "rotate rotate6"
}), _c('div', {
staticClass: "rotate rotate7"
}), _c('div', {
staticClass: "rotate rotate8"
})] : [_c('div', {
staticClass: "point point1"
}), _c('div', {
staticClass: "point point2"
}), _c('div', {
staticClass: "point point3"
}), _c('div', {
staticClass: "point point4"
})]], 2), _c('div', {
staticClass: "bk-loading-title"
}, [_vm._t("title", [_vm._v(_vm._s(_vm.title))])], 2)])])], 1) : _c('transition', {
attrs: {
"name": "fade",
"duration": {
enter: _vm.duration
}
},
on: {
"after-leave": _vm.animationFinish
}
}, [_c('div', {
directives: [{
name: "show",
rawName: "v-show",
value: _vm.isShow,
expression: "isShow"
}],
staticClass: "bk-loading",
class: _vm.extCls,
style: {
position: _vm.type,
renderZIndex: _vm.renderZIndex,
backgroundColor: _vm.bgColor
}
}, [_c('div', {
staticClass: "bk-loading-wrapper"
}, [_c('div', {
class: _vm.computedClass
}, [_vm.isSpin ? [_c('div', {
staticClass: "rotate rotate1"
}), _c('div', {
staticClass: "rotate rotate2"
}), _c('div', {
staticClass: "rotate rotate3"
}), _c('div', {
staticClass: "rotate rotate4"
}), _c('div', {
staticClass: "rotate rotate5"
}), _c('div', {
staticClass: "rotate rotate6"
}), _c('div', {
staticClass: "rotate rotate7"
}), _c('div', {
staticClass: "rotate rotate8"
})] : [_c('div', {
staticClass: "point point1"
}), _c('div', {
staticClass: "point point2"
}), _c('div', {
staticClass: "point point3"
}), _c('div', {
staticClass: "point point4"
})]], 2), _c('div', {
staticClass: "bk-loading-title"
}, [_vm._t("title", [_vm._v(_vm._s(_vm.title))])], 2)])])]);
};
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 LoadingConstructor = Vue.extend(__vue_component__);
var instance;
var Loading = function Loading() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
if (typeof options === 'string') {
options = {
title: options
};
}
options.type = 'fixed';
options.opacity = options.opacity || 0.9;
options.color = options.color || '#ffffff';
instance = new LoadingConstructor({
propsData: options
});
if (isVNode(instance.title)) {
instance.$slots.title = [instance.title];
instance.title = null;
} else {
delete instance.$slots.title;
}
instance.viewmodel = instance.$mount();
document.body.appendChild(instance.viewmodel.$el);
instance.$dom = instance.viewmodel.$el;
instance.viewmodel.isShow = true;
return instance.viewmodel;
};
Loading.hide = function () {
instance.viewmodel.hide = true;
};
Vue.prototype.$bkLoading = Loading;
var Model = Vue.extend(__vue_component__);
function show(el, options) {
if (!el.$vm) {
el.$vm = el.viewmodel.$mount();
el.appendChild(el.$vm.$el);
}
el.$vm.duration = 0;
Vue.nextTick(function () {
el.$vm.isShow = true;
});
}
function toggle(el, options) {
if (!el.$vm) {
el.$vm = el.viewmodel.$mount();
el.appendChild(el.$vm.$el);
}
clearTimeout(el.$vm.timer);
if (options.isLoading) {
Vue.nextTick(function () {
el.$vm.isShow = true;
});
} else {
var delay = isNaN(options.delay) ? 0 : Number(options.delay);
if (delay > 0) {
el.$vm.timer = setTimeout(function () {
el.$vm.isShow = false;
}, delay);
} else {
Vue.nextTick(function () {
el.$vm.isShow = false;
});
}
}
if (options.title) {
el.$vm.title = options.title;
}
}
var bkLoading = {
inserted: function inserted(el, binding) {
var value = binding.value;
var position = getComputedStyle(el).position;
var options = {};
if (!position || position !== 'relative' || position !== 'absolute') {
el.style.position = 'relative';
}
for (var key in value) {
if (key !== 'isLoading') {
options[key] = value[key];
}
}
options.delay = 3000;
options.type = 'absolute';
options.opacity = options.opacity || 0.9;
options.color = options.color || '#ffffff';
el.viewmodel = new Model({
propsData: options
});
if (options.immediate) {
show(el, binding.value);
} else {
toggle(el, binding.value);
}
},
update: function update(el, binding) {
if (el.viewmodel) {
toggle(el, binding.value);
}
}
};
__vue_component__.install = function (Vue) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var props = __vue_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];
}
}
});
__vue_component__.name = options.namespace ? __vue_component__.name.replace('bk', options.namespace) : __vue_component__.name;
Vue.component(__vue_component__.name, __vue_component__);
Vue.directive('bkloading', bkLoading);
};
var index = _extends(__vue_component__, {
Loading: Loading,
directive: bkLoading
});
exports.default = index;
Object.defineProperty(exports, '__esModule', { value: true });
}));