使用oracle数据库做的数据上传系统前端
kongdeqiang
2026-03-23 2adf0b60f951746518feb88a11501b10455d83d6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import App from './App.vue'
import router from './router'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
 
import { createI18n } from 'vue-i18n'
 
const app = createApp(App)
 
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
 
const messages = {
  zh: {
    welcome: '欢迎使用 Vue-i18n',
    button: '按钮',
    tip: '这是固定的中文文案'
    // 你可以根据业务需求添加更多中文文案
  }
}
 
// 4. 创建 i18n 实例(仅配置中文)
const i18n = createI18n({
  legacy: false, // 适配 Vue 3 组合式 API
  locale: 'zh', // 固定为中文
  fallbackLocale: 'zh', // 容错也指向中文(避免意外显示其他语言)
  messages
})
 
app.use(createPinia())
app.use(router)
// app.use(ElementPlus)
app.use(ElementPlus, {
  locale: zhCn // 关键:指定 Element Plus 语言为中文
})
app.use(i18n)
app.mount('#app')