- 新增 `.env.development` 和 `.env.production` 文件,分别配置开发和生产环境的 API 基础 URL - 更新 `package.json`,添加 `element-plus`、`axios`、`pinia` 等依赖 - 删除未使用的图标组件和欢迎页面组件 - 新增路由配置和主题管理 store - 新增首页和搜索结果页面组件 - 更新 `vite.config.js`,添加代理配置和环境变量定义
21 lines
528 B
JavaScript
21 lines
528 B
JavaScript
|
|
import "@/assets/main.css"
|
|
import { createApp } from 'vue'
|
|
import { createPinia } from 'pinia'
|
|
import App from './App.vue'
|
|
import router from './router'
|
|
import ElementPlus from 'element-plus'
|
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
|
import 'element-plus/dist/index.css'
|
|
|
|
const app = createApp(App)
|
|
const pinia = createPinia()
|
|
|
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|
app.component(key, component)
|
|
}
|
|
app.use(router)
|
|
app.use(ElementPlus)
|
|
app.use(pinia)
|
|
app.mount('#app')
|