Commit fb189f1650f8bf3f0858c338084342fc9efd4f76

Authored by young
1 parent 75ed74e9

cancel the components prefix

Showing 1 changed file with 2 additions and 5 deletions   Show diff stats
@@ -116,16 +116,13 @@ const iview = { @@ -116,16 +116,13 @@ const iview = {
116 Tree, 116 Tree,
117 Upload 117 Upload
118 }; 118 };
119 -let defaultOptions = {  
120 - componentPrefix: ''  
121 -}; 119 +
122 const install = function (Vue, opts = {}) { 120 const install = function (Vue, opts = {}) {
123 - opts = Object.assign(defaultOptions, (opts || {}));  
124 locale.use(opts.locale); 121 locale.use(opts.locale);
125 locale.i18n(opts.i18n); 122 locale.i18n(opts.i18n);
126 123
127 Object.keys(iview).forEach((key) => { 124 Object.keys(iview).forEach((key) => {
128 - Vue.component(`${opts.componentPrefix.toUpperCase()}${key}`, iview[key]); 125 + Vue.component(key, iview[key]);
129 }); 126 });
130 127
131 Vue.prototype.$Loading = LoadingBar; 128 Vue.prototype.$Loading = LoadingBar;