修改element-plus为中文

v1.0.0
于肖磊 2024-08-23 18:51:41 +08:00
parent 12810a2d01
commit 13c8bf4d7e
2 changed files with 8 additions and 6 deletions

View File

@ -1,6 +1,13 @@
<template>
<router-view />
<el-config-provider :locale="zhCn">
<router-view />
</el-config-provider>
</template>
<script setup lang="ts">
import { ElConfigProvider } from 'element-plus';
//
import zhCn from 'element-plus/es/locale/lang/zh-cn';
//
import en from 'element-plus/es/locale/lang/en';
</script>
<style scoped lang="scss"></style>

View File

@ -6,8 +6,6 @@ import router from './router';
import Particles from 'vue3-particles';
import common from '@/utils/common';
import ElementPlus from 'element-plus';
import zhCn from 'element-plus/es/locale/lang/zh-cn';
//default styles
import Vue3DraggableResizable from 'vue3-draggable-resizable'
import 'vue3-draggable-resizable/dist/Vue3DraggableResizable.css'
@ -21,9 +19,6 @@ app.config.globalProperties.$common = common;
app.use(router);
app.use(Particles);
app.use(Vue3DraggableResizable);
app.use(ElementPlus, {
locale: zhCn,
});
// 全局注册 状态管理(store)
setupStore(app);