diff --git a/src/App.vue b/src/App.vue index 1df0ab9..b1b5840 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,15 +2,15 @@ import { h } from "vue" import { useTheme } from "@/hooks/useTheme" import { ElNotification } from "element-plus" +// 将 Element Plus 的语言设置为中文 import zhCn from "element-plus/lib/locale/lang/zh-cn" const { initTheme } = useTheme() /** 初始化主题 */ initTheme() -/** 将 Element Plus 的语言设置为中文 */ -const locale = zhCn +/** 作者小心思 */ ElNotification({ title: "Hello", message: h( @@ -24,7 +24,7 @@ ElNotification({ </script> <template> - <ElConfigProvider :locale="locale"> + <ElConfigProvider :locale="zhCn"> <router-view /> </ElConfigProvider> </template>