Browse Source

✨ feat(main): 优化主入口文件,移除未使用的图标组件和创建 Pinia 的方式

陈雪 3 weeks ago
parent
commit
a3d4d4dd8e
1 changed files with 1 additions and 6 deletions
  1. 1 6
      src/main.ts

+ 1 - 6
src/main.ts

@@ -3,16 +3,11 @@ import router from './router'
 import App from './App.vue'
 import ElementPlus from 'element-plus'
 import 'element-plus/dist/index.css'
-import * as ElementPlusIconsVue from '@element-plus/icons-vue'
-import { createPinia } from 'pinia'
+import pinia from '@/store'
 import i18n from './i18n'
 import './styles.css'
 import './element.scss'
 
-const pinia = createPinia()
 const app = createApp(App)
 app.use(pinia).use(ElementPlus).use(i18n).use(router)
 app.mount('#app')
-// for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
-//   ;(app as any).component(key, component)
-// }