Skip to content

Commit

Permalink
feat: Element-plus 组件设置默认中文
Browse files Browse the repository at this point in the history
  • Loading branch information
baiwumm committed Jun 14, 2024
1 parent 544e582 commit 1295c6a
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions src/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
<template>
<el-container direction="vertical">
<!-- header -->
<Header />
<!-- main -->
<el-main>
<slot />
</el-main>
<!-- footer -->
<Footer />
</el-container>
<el-config-provider :locale="zhCn">
<el-container direction="vertical">
<!-- header -->
<Header />
<!-- main -->
<el-main>
<slot />
</el-main>
<!-- footer -->
<Footer />
</el-container>
</el-config-provider>
</template>
<script lang="ts" setup>
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>

0 comments on commit 1295c6a

Please sign in to comment.