zhuoyuan.wang
2024-06-19 15ebe96f28cadec6a726c5324593a40bbf56205f
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
import {createApp} from 'vue';
 
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
 
/**
 * global css
 */
import '@/assets/styles/index.scss';
 
import App from '@/App';
import store from '@/store';
import router from '@/router';
import i18n from '@/i18n';
import directive from '@/directive';
 
import plugins from '@/plugins';
 
// svg图标
import 'virtual:svg-icons-register';
 
import '@/router/interceptor.js';
 
const app = createApp(App);
 
import * as Components from '@/components';
import * as Icons from "@element-plus/icons-vue";
 
// register the element component
Object.keys(Components).forEach(key => app.component(`App${key}`, Components[key]));
Object.keys(Icons).forEach(key => app.component(`${key}`, Icons[key]));
 
app.use(router)
  .use(store)
  .use(plugins)
  .use(i18n)
  .use(
    ElementPlus,
    {
      locale: i18n.element,
      size: 'default'
    }
  );
 
directive(app);
 
 
app.mount('#app');