特殊转换,低代码表格的自定义渲染
(text, record, index, $material, $lightCode, $antd) =>{
const newDate = new Date(text).toJSON();
return <div>{text?new Date(+new Date(newDate) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''):''}</div>
}
效果
接口返回 createTime: 1712132759000
页面转换后 2024-04-18 10:54:03