main.ts 970 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import { createApp } from 'vue'
  2. import { createPinia } from 'pinia'
  3. import ElementPlus from 'element-plus'
  4. import 'element-plus/dist/index.css'
  5. import {
  6. ArrowDown,
  7. Bell,
  8. CircleCheck,
  9. Clock,
  10. Connection,
  11. DataAnalysis,
  12. Document,
  13. EditPen,
  14. HomeFilled,
  15. List,
  16. Message,
  17. Monitor,
  18. Pointer,
  19. Promotion,
  20. Setting,
  21. Stamp,
  22. TrendCharts,
  23. User,
  24. UserFilled,
  25. Warning
  26. } from '@element-plus/icons-vue'
  27. import App from './App.vue'
  28. import router from './router'
  29. import './style.css'
  30. const app = createApp(App)
  31. // 按需注册图标
  32. const icons = {
  33. ArrowDown,
  34. Bell,
  35. CircleCheck,
  36. Clock,
  37. Connection,
  38. DataAnalysis,
  39. Document,
  40. EditPen,
  41. HomeFilled,
  42. List,
  43. Message,
  44. Monitor,
  45. Pointer,
  46. Promotion,
  47. Setting,
  48. Stamp,
  49. TrendCharts,
  50. User,
  51. UserFilled,
  52. Warning
  53. }
  54. for (const [key, component] of Object.entries(icons)) {
  55. app.component(key, component)
  56. }
  57. app.use(createPinia())
  58. app.use(router)
  59. app.use(ElementPlus)
  60. app.mount('#app')