cancel the components prefix
This commit is contained in:
parent
75ed74e9a6
commit
fb189f1650
1 changed files with 2 additions and 5 deletions
|
@ -116,16 +116,13 @@ const iview = {
|
||||||
Tree,
|
Tree,
|
||||||
Upload
|
Upload
|
||||||
};
|
};
|
||||||
let defaultOptions = {
|
|
||||||
componentPrefix: ''
|
|
||||||
};
|
|
||||||
const install = function (Vue, opts = {}) {
|
const install = function (Vue, opts = {}) {
|
||||||
opts = Object.assign(defaultOptions, (opts || {}));
|
|
||||||
locale.use(opts.locale);
|
locale.use(opts.locale);
|
||||||
locale.i18n(opts.i18n);
|
locale.i18n(opts.i18n);
|
||||||
|
|
||||||
Object.keys(iview).forEach((key) => {
|
Object.keys(iview).forEach((key) => {
|
||||||
Vue.component(`${opts.componentPrefix.toUpperCase()}${key}`, iview[key]);
|
Vue.component(key, iview[key]);
|
||||||
});
|
});
|
||||||
|
|
||||||
Vue.prototype.$Loading = LoadingBar;
|
Vue.prototype.$Loading = LoadingBar;
|
||||||
|
|
Loading…
Add table
Reference in a new issue