ant-design / pro-components

🏆 Use Ant Design like a Pro!
https://pro-components.antdigital.dev
MIT License
4.04k stars 1.29k forks source link

🐛[BUG] protable设置scroll.y后列标题宽度失效 #8307

Closed zzzhangy closed 1 month ago

zzzhangy commented 1 month ago

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🐛 bug 描述

                      设置scroll.y后列标题栏宽度失效,变为均分表头宽度

📷 复现步骤

image

🏞 期望结果

设置scroll.y后展示正常

💻 复现代码

<ProTable columns={filteredColumns} dataSource={mediaIndex[selectMedia].manuscriptsTop10} search={false} options={false} rowKey={(columns) => { return ${columns.id}${new Date().getTime()} }} pagination={false} bordered={false} scroll={{ y:406, x:'max-content' }} />
export const mediaIndexTopColumns:ProColumns[] = [

{ title: '账号', dataIndex: 'wechatAccount', key: 'wechatAccount', width:100, // colSpan:100, align:'left', render:(text: any, record: any) => { return ( <Paragraph style={{minWidth: '50px', height: '56px', lineHeight: '56px'}} ellipsis={{ rows: 1, tooltip: text}}>{text} ) } }, { title: '标题', dataIndex: 'title', key: 'title', width:140, // colSpan:140, align:'left', render:(text: any, record: any) => { return (

{text}
  )
}

},

]

© 版本信息

🚑 其他信息