ant design 如何把表格expandIcon 渲染在最后一列固定列上?

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>

)

}

以上是 ant design 如何把表格expandIcon 渲染在最后一列固定列上? 的全部内容, 来源链接: utcz.com/p/934990.html

回到顶部