expandIcon 渲染在其他列都是正常,但是渲染到最后一列固定列上就显示不出来
<a-table
:columns="columns"
:data-source="data"
bordered
:expandRowByClick="false"
:expandIconColumnIndex="10"
:expandIconAsCell="false"
:expandIcon="(props) => this.customExpandIcon(props)"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:scroll="{ x: 2000, y: 900 }"
> </a-table>
customExpandIcon(props) {
console.log(props)
// if(props.record.children.length > 0){
if (props.expanded) {
return (
<a
style={{ color: 'black', marginRight: 8 }}
onClick={(e) => {
props.onExpand(props.record, e)
}}
>
<a-button type="link">关闭详情</a-button>
</a>
)
} else {
return (
<a
style={{ color: 'black', marginRight: 8 }}
onClick={(e) => {
props.onExpand(props.record, e)
}}
>
<a-button type="link">查看详情</a-button>
</a>
)
}