pro-components icon indicating copy to clipboard operation
pro-components copied to clipboard

🧐antd外层ConfigProvider配置了中文语言,里面使用了pro-components的EditableProTable却仍是英文语言

Open 1246365871 opened this issue 2 years ago • 1 comments

🧐 问题描述

在antd外层ConfigProvider配置了中文语言,antd正常的日期组件是中文,但里面使用了pro-components的EditableProTable日期却仍是英文。 image 尝试网上搜了各种方法都无法解决,自己尝试更换pro-components版本(^1.1.6 -> 1.1.5),里面的日期英文却好了一半。 image

💻 示例代码

package.json: "@ant-design/pro-components": "^1.1.6", "@ant-design/pro-table": "2.56.3", "antd": "^4.21.2", "react": "^17.0.2",

🚑 其他信息

image image image image

1246365871 avatar Jul 13 '22 02:07 1246365871

+1

hejinguo avatar Oct 14 '22 09:10 hejinguo

+1

"@ant-design/pro-components": "2.3.36", "antd": "5.0.3",

image

2022-15-05 更新: 方案一:增加 import 'dayjs/locale/zh-cn' 可解决,猜测原因是 umi 的多语言设置依旧是设置的 moment 的

image image

方案二:或者 umi max 配置增加 moment2dayjs 插件也可以 image

lilililee avatar Dec 01 '22 12:12 lilililee

umi 已经修复了,大家可以直接在 locale中设置了,同时也会处理 dayjs的问题

chenshuai2144 avatar Jan 08 '23 09:01 chenshuai2144