Closed killer-wu closed 1 year ago
当前 Issue 未检测到标题,请规范填写,谢谢!
The title of the current issue is not detected, please fill in according to the specifications, thank you!
看之前提过此问题,给项目安装一个最新版dayjs可以解决,安装之后报错是没有了,但是无法汉化了。
import moment from "moment/moment"; import dayjs from "dayjs"; import 'dayjs/locale/zh-cn'; import 'moment/locale/zh-cn'; moment.locale('zh-cn'); dayjs.locale('zh-cn');
我当初也碰到这个问题,pnpm管理本地项目dayjs版本和pro-components中依赖版本不一致,导致线上2套dayjs实例问题引起的,后来我把本地dayjs修改为同pro-components一致的就可以了
我当初也碰到这个问题,pnpm管理本地项目dayjs版本和pro-components中依赖版本不一致,导致线上2套dayjs实例问题引起的,后来我把本地dayjs修改为同pro-components一致的就可以了
是的这样确实能解决兼容问题,就是汉化有问题了
+1
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
🧐 问题描述
antd 引入了dayjs1.11.7的版本,pro-component引入了dayjs1.11.9的版本 这样导致在使用日期选择器的时候会出现版本不兼容的问题
再次点击日期选择器的时候会报错
💻 示例代码
{ title: '订单生成时间', dataIndex: 'create_time', align: 'center', valueType: 'dateTimeRange', fieldProps: { locale: 'zh-en' }, search: { transform: (value) => { const [start, end] = value
🚑 其他信息
"antd": "^5.7.1", "@ant-design/pro-components": "^2.6.6",