From 12810a2d014974bb3c3accc4c5a45a448e910130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Fri, 23 Aug 2024 18:46:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9element-plus=E4=B8=BA?= =?UTF-8?q?=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/base/color-picker/index.vue | 2 +- src/layout/components/main/default/custom.ts | 1 - src/layout/components/main/default/data-magic.ts | 1 - src/layout/components/main/default/user-info.ts | 1 - src/main.ts | 7 ++++++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/base/color-picker/index.vue b/src/components/base/color-picker/index.vue index f6e01e6e..b1e572e3 100644 --- a/src/components/base/color-picker/index.vue +++ b/src/components/base/color-picker/index.vue @@ -1,6 +1,6 @@ diff --git a/src/layout/components/main/default/custom.ts b/src/layout/components/main/default/custom.ts index f60a9dce..a3c330bd 100644 --- a/src/layout/components/main/default/custom.ts +++ b/src/layout/components/main/default/custom.ts @@ -1,4 +1,3 @@ -import { de } from "element-plus/es/locale"; import defaultCommon from "./index"; interface defaultSearch { diff --git a/src/layout/components/main/default/data-magic.ts b/src/layout/components/main/default/data-magic.ts index a5262998..62a5c6ea 100644 --- a/src/layout/components/main/default/data-magic.ts +++ b/src/layout/components/main/default/data-magic.ts @@ -1,6 +1,5 @@ import { get_math } from "@/utils"; import defaultCommon from "./index"; -import { tr } from "element-plus/es/locale"; interface data_magic { start: object; end: object; diff --git a/src/layout/components/main/default/user-info.ts b/src/layout/components/main/default/user-info.ts index bcf0ccf7..50a6e369 100644 --- a/src/layout/components/main/default/user-info.ts +++ b/src/layout/components/main/default/user-info.ts @@ -1,4 +1,3 @@ -import { id } from 'element-plus/es/locale'; import defaultCommon from './index'; interface DefaultUserInfo { content: { diff --git a/src/main.ts b/src/main.ts index be250025..7ab191db 100644 --- a/src/main.ts +++ b/src/main.ts @@ -6,8 +6,10 @@ import router from './router'; import Particles from 'vue3-particles'; import common from '@/utils/common'; -import Vue3DraggableResizable from 'vue3-draggable-resizable' +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' import '@/styles/index.scss'; @@ -19,6 +21,9 @@ app.config.globalProperties.$common = common; app.use(router); app.use(Particles); app.use(Vue3DraggableResizable); +app.use(ElementPlus, { + locale: zhCn, +}); // 全局注册 状态管理(store) setupStore(app);