main.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import { createApp } from "vue";
  2. import App from "./App.vue";
  3. // reset style sheet
  4. import "@/styles/reset.scss";
  5. // CSS common style sheet
  6. import "@/styles/common.scss";
  7. // iconfont css
  8. import "@/assets/iconfont/iconfont.scss";
  9. // font css
  10. import "@/assets/fonts/font.scss";
  11. // element css
  12. import "element-plus/dist/index.css";
  13. // element dark css
  14. import "element-plus/theme-chalk/dark/css-vars.css";
  15. // custom element dark css
  16. import "@/styles/element-dark.scss";
  17. // custom element css
  18. import "@/styles/element.scss";
  19. // svg icons
  20. import "virtual:svg-icons-register";
  21. // element plus
  22. import ElementPlus from "element-plus";
  23. // element icons
  24. import * as Icons from "@element-plus/icons-vue";
  25. // custom directives
  26. import directives from "@/directives/index";
  27. // vue Router
  28. import router from "@/routers";
  29. // vue i18n
  30. import I18n from "@/languages/index";
  31. // pinia store
  32. import pinia from "@/stores";
  33. // errorHandler
  34. import errorHandler from "@/utils/errorHandler";
  35. const app = createApp(App);
  36. app.config.errorHandler = errorHandler;
  37. // register the element Icons component
  38. Object.keys(Icons).forEach(key => {
  39. app.component(key, Icons[key as keyof typeof Icons]);
  40. });
  41. app.use(ElementPlus).use(directives).use(router).use(I18n).use(pinia).mount("#app");