A8000
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
749 B

8 months ago
8 months ago
8 months ago
  1. import { createApp } from 'vue'
  2. import './style.css'
  3. import App from './App.vue'
  4. import router from './router/router'
  5. import ElementPlus from 'element-plus'
  6. import 'element-plus/dist/index.css'
  7. import * as ElementPlusIconsVue from '@element-plus/icons-vue'
  8. // import './mock/index'
  9. import { createPinia } from 'pinia'
  10. import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
  11. // 动态加载 Mock
  12. if (import.meta.env.VITE_USE_MOCK === 'true') {
  13. import('./mock/index')
  14. }
  15. const pinia = createPinia()
  16. pinia.use(piniaPluginPersistedstate)
  17. const app = createApp(App)
  18. for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  19. app.component(key, component)
  20. }
  21. app.use(router)
  22. app.use(pinia)
  23. app.use(ElementPlus)
  24. app.mount('#app')