lowcode-engine icon indicating copy to clipboard operation
lowcode-engine copied to clipboard

表格-数据列详情,时间格式选不上

Open yiRain123 opened this issue 2 years ago • 1 comments

Describe the bug (required) / 详细描述 bug(必填)

表格-数据列详情,时间格式选不上,导致表格不能显示除年月日以外其他的时间格式


To Reproduce (required) / 如何复现 bug?(必填,非常重要)

详细复现步骤:

  1. 打开 demo
  2. 拖入表格;
  3. 打开右侧属性面板,找到日期列;
  4. 点击修改按钮,选择时间格式;
  5. 鼠标移开后,时间格式未选中

Expected behavior (required) / 预期行为(必填,非常重要)

日期格式选不上,导致表格不能显示除年月日以外其他的日期格式

Screenshots (optional) / bug 截图(可选)

1688970634785

Environments (please complete the following information) (required): / 请提供如下信息(必填)

  • AliLowCodeEngine version: [e.g. 1.0.0] / 低代码引擎版本
  • AliLowCodeEngineExt version: [e.g. 1.0.0] / 低代码引擎扩展包版本
  • Browser [e.g. chrome, safari] / 浏览器版本
  • materials / plugins / tools / 其他物料 / 插件 / 工具链版本

(this information can be collected via the manual plugin / 版本信息可通过低代码用户手册插件收集)

Additional context (optional) / 更多额外信息(可选)

Any other context of the problem here. / 可以追加更多的额外信息,帮助定位问题

yiRain123 avatar Jul 10 '23 06:07 yiRain123

这个其实是官方包的bug,碰巧我也遇到了,说一下我是怎么解决。 1:下载官方包到本地 https://github.com/alibaba/lowcode-materials。 2:cd /packages/fusion-ui/lowcode/columns-field.ts 然后搜索 _format_options_date ,再把getValue函数注释掉,这样就可以选中回填上去了,但是还会有问题,官方包并没有把所有的年月日格式写完整,你的table会不生效。 3:cd /packages/fusion-ui/src/components/pro-table/components/pro-table-column/defaultColumnFormatters.tsx import dayjs from 'dayjs';

date: (options:any) => { return { cellTooltipMode: 'ellipsis', width: 158, align: 'center', // cell: options.formatterCellFactory(formatDate), cell: (value:any) => dayjs(value).format(options.column._format_options_date), editCell: DateEditCell, } },

这样就正常了,接着就是最重要的把你修改之后的包丢到项目里去了。 先 npm run build,在npm run lowcode:build 你会得到 dist 跟build 两个目录,你需要把这两个目录丢到你的项目里,然后修改assets.json里面对于 @alifd/fusion-ui 的引入就可以了。

dbb1016606796 avatar Feb 24 '25 07:02 dbb1016606796