fix: configure Element Plus Chinese locale (zh-cn)
Add zh-cn locale to Element Plus globally via app.use() and el-config-provider wrapper, and apply :locale prop to all el-date-picker components in dialogs to ensure correct Chinese display in date pickers, calendars, and other locale-aware UI. Made-with: Cursor
This commit is contained in:
@@ -6,6 +6,7 @@ import { useCategoryStore } from '@/stores/useCategoryStore'
|
||||
import { useTagStore } from '@/stores/useTagStore'
|
||||
import { useUIStore } from '@/stores/useUIStore'
|
||||
import { useUserSettingsStore } from '@/stores/useUserSettingsStore'
|
||||
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
||||
import AppHeader from '@/components/AppHeader.vue'
|
||||
import TaskDialog from '@/components/TaskDialog.vue'
|
||||
import CategoryDialog from '@/components/CategoryDialog.vue'
|
||||
@@ -60,6 +61,7 @@ onMounted(async () => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-config-provider :locale="zhCn">
|
||||
<div class="app-container">
|
||||
<div class="decoration-star" style="top: 20%; right: 8%; animation-delay: 0.5s;"></div>
|
||||
<div class="decoration-star" style="top: 60%; left: 3%; animation-delay: 1s;"></div>
|
||||
@@ -97,6 +99,7 @@ onMounted(async () => {
|
||||
<TaskDialog />
|
||||
<CategoryDialog />
|
||||
</div>
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user