Global install iView

Global install iView
This commit is contained in:
梁灏 2016-11-14 13:49:06 +08:00
parent 7e554530a1
commit 451b52ceab
7 changed files with 771 additions and 571 deletions

View file

@ -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});