add iview.install()
This commit is contained in:
parent
49f124ae88
commit
343abe50e7
3 changed files with 17 additions and 6 deletions
13
src/index.js
13
src/index.js
|
@ -80,4 +80,15 @@ const iview = {
|
|||
iSelect: Select
|
||||
};
|
||||
|
||||
module.exports = iview;
|
||||
const install = function (Vue) {
|
||||
Object.keys(iview).forEach((key) => {
|
||||
Vue.component(key, iview[name])
|
||||
})
|
||||
}
|
||||
|
||||
// auto install
|
||||
if (typeof window !== 'undefined' && window.Vue) {
|
||||
install(window.Vue);
|
||||
};
|
||||
|
||||
module.exports = Object.assign(iview, {install});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue