mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
feat: 更新 Element Plus 语言配置处理方式
- 移除了 main.js 中对 zhCn 语言包的直接引用,改为在 App.vue 中通过 ElConfigProvider 处理语言配置。 - 这一变更提升了国际化的灵活性和可维护性,确保语言设置集中管理。
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { createApp } from 'vue'
|
||||
import { createPinia } from 'pinia'
|
||||
import ElementPlus from 'element-plus'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import 'element-plus/dist/index.css'
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css'
|
||||
import App from './App.vue'
|
||||
@@ -24,10 +23,8 @@ app.use(router)
|
||||
// 使用Vue I18n
|
||||
app.use(i18n)
|
||||
|
||||
// 使用Element Plus
|
||||
app.use(ElementPlus, {
|
||||
locale: zhCn
|
||||
})
|
||||
// 使用Element Plus - 语言配置在 App.vue 中通过 ElConfigProvider 处理
|
||||
app.use(ElementPlus)
|
||||
|
||||
// 设置axios拦截器
|
||||
const userStore = useUserStore()
|
||||
|
||||
Reference in New Issue
Block a user