import React, { Component } from "react"; import { WeaTable } from "ecCom"; import "./index.less"; class Index extends Component { render() { const { columns, xWidth = 1440 } = this.props; const unifiedColumns = _.map(columns, (item, index) => { if (index === 0 || index === 2) { return { ...item, fixed: "left", width: 150 }; } else if (index === 1) { return { ...item, fixed: "left", width: 176 }; } if (item.dataIndex === "operate" || item.dataIndex === "opts") { return { ...item, fixed: "right", width: item.width || "120px" }; } return { ...item, width: "33%" }; }); return ( ); } } export default Index;