Global install iView
Global install iView
This commit is contained in:
parent
7e554530a1
commit
451b52ceab
7 changed files with 771 additions and 571 deletions
11
src/index.js
11
src/index.js
|
@ -75,12 +75,17 @@ const iview = {
|
|||
const install = function (Vue) {
|
||||
Object.keys(iview).forEach((key) => {
|
||||
Vue.component(key, iview[key])
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
Vue.prototype.$Loading = LoadingBar;
|
||||
Vue.prototype.$Message = Message;
|
||||
Vue.prototype.$Modal = Modal;
|
||||
Vue.prototype.$Notice = Notice;
|
||||
};
|
||||
|
||||
// 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