Commit fb189f1650f8bf3f0858c338084342fc9efd4f76
1 parent
75ed74e9
cancel the components prefix
Showing
1 changed file
with
2 additions
and
5 deletions
Show diff stats
src/index.js
... | ... | @@ -116,16 +116,13 @@ const iview = { |
116 | 116 | Tree, |
117 | 117 | Upload |
118 | 118 | }; |
119 | -let defaultOptions = { | |
120 | - componentPrefix: '' | |
121 | -}; | |
119 | + | |
122 | 120 | const install = function (Vue, opts = {}) { |
123 | - opts = Object.assign(defaultOptions, (opts || {})); | |
124 | 121 | locale.use(opts.locale); |
125 | 122 | locale.i18n(opts.i18n); |
126 | 123 | |
127 | 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 | 128 | Vue.prototype.$Loading = LoadingBar; | ... | ... |