import { createApp } from 'vue' import App from './App.vue' import router from './router' import { setup } from '@/utils/componentHelper' import http from '@/api/http.js' import Dialog, { Toast, Alert, DialogContent } from '@/plugin/dialog/index.js' import '@/plugin/dialog/dialog.scss' const components = setup( Dialog, Toast, Alert, DialogContent ) const CompoentsPlugin = (app) => { components.forEach(component => component.install(app)) } const app = createApp(App) app.config.globalProperties.config = config app.config.globalProperties.$Dialog = Dialog app.config.globalProperties.$http = http app.use(router).use(CompoentsPlugin).mount('#app');