zhaoxing
2022-08-06 abcb0e14feb3591ed2648a08dac298cb856c0a86
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { createApp } from "vue";
import App from "./App.vue";
 
// cool
import { bootstrap } from "./cool";
 
 
// router
import router from "./router";
 
// store
import store from "./store";
 
// mock
import "./mock";
 
// element-plus
import ElementPlus from "element-plus";
import "element-plus/theme-chalk/src/index.scss";
 
// mitt
import mitt from "mitt";
 
// echarts
import VueECharts from "vue-echarts";
 
import io from 'socket.io-client'
import { Vue } from "vue-demi";
 
 
 
const app = createApp(App);
 
bootstrap(app)
  .then(() => {
    // echarts 可视图表
    app.component("v-chart", VueECharts);
 
    // 事件通讯
    app.provide("mitt", mitt());
 
    app.use(store).use(router).use(ElementPlus).mount("#app");
  })
  .catch((err: string) => {
    console.error(`COOL-ADMIN 启动失败`, err);
  });
 
// 应用加载
store.dispatch("appLoad");
 
// @ts-ignore
window.__app__ = app;