fix(DatePicker): zh-CN is not work in DatePicker (#3273)

* fix(DatePicker): zh-CN is not work in DatePicker

* fix(DatePicker): locale zh-CN is not work in DatePicker
This commit is contained in:
zhang 2023-11-13 13:14:59 +08:00 committed by GitHub
parent 2991bb1670
commit 6d047fb53f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,10 +1,18 @@
import { genMessage } from '../helper'; import { genMessage } from '../helper';
import antdLocale from 'ant-design-vue/es/locale/zh_CN'; import antdLocale from 'ant-design-vue/es/locale/zh_CN';
import { deepMerge } from '/@/utils';
const modules = import.meta.glob('./zh-CN/**/*.json', { eager: true }); const modules = import.meta.glob('./zh-CN/**/*.json', { eager: true });
export default { export default {
message: { message: {
...genMessage(modules as Recordable<Recordable>, 'zh-CN'), ...genMessage(modules as Recordable<Recordable>, 'zh-CN'),
antdLocale, antdLocale: {
...antdLocale,
DatePicker: deepMerge(
antdLocale.DatePicker,
genMessage(modules as Recordable<Recordable>, 'zh-CN').antdLocale.DatePicker,
),
},
}, },
}; };