Skip to content

支持colSpan、rowSpan

Compare
Choose a tag to compare
@NexxLuo NexxLuo released this 29 Aug 03:32
· 717 commits to master since this release
  1. 支持colSpan、rowSpan,使用方式同antd/table;

如下:

{
title:"合并",
  render: (value, row, index) => {
      const obj = {
        children: value,
        props: {}
      };
      if (index === 5) {
        obj.props.rowSpan = 5;
        obj.children = (
          <div
            style={{
              width: 12,
              wordBreak: "break-all",
              whiteSpace: "pre-line",
              margin: "auto"
            }}
          >
            行数据合并
          </div>
        );
      }

      if(index === 1){
        obj.props.colSpan = 2;
        obj.children = (
          <div
          >
            列数据合并
          </div>
        );
      }

      return obj;
    }
}