Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛[BUG] EditableProTable valueType设置为date类型,输出的日期格式变成了"YYYY-MM-DD hh:mm:ss",这与之前的格式"YYYY-MM-DD"不一致 #8875

Open
dengnidejijie opened this issue Nov 18, 2024 · 0 comments

Comments

@dengnidejijie
Copy link

dengnidejijie commented Nov 18, 2024

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🐛 bug 描述

将EditableProTable valueType设置为date类型,输出的日期格式变成了"YYYY-MM-DD hh:mm:ss",这与之前组件输出的格式"YYYY-MM-DD"不一致,导致需要额外处理日期类型。并且是突然出现的问题,业务中正常使用了几个月,最近几天突然频繁接到反馈问题,因为我们做了强类型控制,变更了格式导致了错误的产生。目前只能通过输出数据强转为需要的格式来解决,但是如何避免此类问题呢?

📷 复现步骤

将EditableProTable的column中添加一个valueType为date类型的组件,onSave的时候打印输出日志

🏞 期望结果

valueType为date类型,输出的结果为YYYY-MM-DD,或者文档中给出详细说明,输出格式,这样开发者在使用的过程中可以收到明确的信息

💻 复现代码

{
title: <span style={{ fontWeight: 'bold' }}>下次沟通时间,
dataIndex: 'nextCommunicationTime',
width: 150,
valueType: 'date',
align: 'center',
},
image

© 版本信息

  • ProComponents 版本: [2.4.14]
  • umi 版本 [3.4.25]
  • 浏览器环境 [Chrome 131.0.6778.70(正式版本) (x86_64)]
  • 开发环境 [mac OS]

🚑 其他信息

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant