import { createApp } from 'vue' import { createPinia } from 'pinia' import piniaPluginPersistedstate from 'pinia-plugin-persistedstate' import ElementPlus from 'element-plus' import * as ElementPlusIconsVue from '@element-plus/icons-vue' import 'element-plus/dist/index.css' // Global reset and application-shell layout contract. Imported after Element // Plus so it can override its component defaults (e.g. .el-main overflow). import './styles/base.css' import App from './App.vue' import router from './router' const app = createApp(App) const pinia = createPinia() // Registered once here; individual stores opt in with the `persist` option. pinia.use(piniaPluginPersistedstate) app.use(pinia) app.use(router) app.use(ElementPlus) // Element Plus icons are components, not part of the plugin, so they are // registered globally to keep templates free of per-file imports. for (const [name, component] of Object.entries(ElementPlusIconsVue)) { app.component(name, component) } app.mount('#app')