果子蓝蓝
侠客
侠客
  • 最后登录2023-01-04
  • 发帖数5
阅读:6837回复:1

react渲染table中的dataIndex获取对象中的对象的值

楼主#
更多 发布于:2021-04-27 09:21
方式一:
{
    title: '订单类型',
    dataIndex: 'dingDanLeiXing',
    align: 'center',
    ellipsis: 'true',
    render(value, record) {
        if(value)
        return value.leiXingMingCheng;
   }
}
方式二:
{
    title: '订单类型',
    dataIndex: 'dingDanLeiXing',
    align: 'center',
    ellipsis: 'true',
    render: dingDanLeiXing => `${dingDanLeiXing.leiXingMingCheng}`
}
[果子蓝蓝于2021-05-10 10:37编辑了帖子]

最新喜欢:

doubleyongdouble... 归矣Y归矣Y
doubleyong
管理员
管理员
  • 最后登录2026-05-25
  • 发帖数1198
  • 最爱沙发
  • 喜欢达人
  • 原创写手
  • 社区居民
  • 忠实会员
沙发#
发布于:2021-04-27 20:30
感谢分享
知识需要管理,知识需要分享
游客


返回顶部

公众号

公众号