main.ts 818 B

123456789101112131415161718192021222324252627282930
  1. import { createApp } from 'vue'
  2. import './style.css'
  3. import App from './App.vue'
  4. import store from './store'
  5. import router from './router'
  6. import ElementPlus from 'element-plus'
  7. import 'element-plus/dist/index.css'
  8. // 导入 Element Plus 暗黑模式样式
  9. import 'element-plus/theme-chalk/dark/css-vars.css'
  10. import i18n from './i18n'
  11. import 'virtual:svg-icons-register'
  12. import { initTheme } from '@/theme'
  13. import { lightTheme } from '@/theme/light'
  14. import { darkTheme } from '@/theme/dark'
  15. // import 'monaco-editor/esm/vs/editor/editor.main.css';
  16. initTheme(lightTheme, darkTheme)
  17. import 'normalize.css'
  18. import 'virtual:uno.css'
  19. const app = createApp(App)
  20. app.use(store)
  21. app.use(router)
  22. app.use(ElementPlus)
  23. app.provide('i18n', i18n)
  24. app.config.globalProperties.$t = (key: string) => i18n.t(key)
  25. app.mount('#app')