create-app.js
542 Bytes
import Vue from 'vue';
import iView from 'iview';
import 'iview/dist/styles/iview.css';
import emitter from './mixins/emitter';
import bus from './bus';
import components from './components';
import './statics/base.scss';
Vue.use(iView);
Vue.prototype.$bus = bus;
Object.keys(components).forEach(cm => {
Object.keys(components[cm]).forEach(ck => {
Vue.component(components[cm][ck].name, components[cm][ck]);
});
});
Vue.mixin(emitter);
export default (App) => {
return new Vue({
el: '#app',
render: h => h(App)
});
};