perf: 代码优化 App.vue
This commit is contained in:
parent
53694a35be
commit
e8d0f9ba9d
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user