Closed zzzhangy closed 1 month ago
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
设置scroll.y后列标题栏宽度失效,变为均分表头宽度
设置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[] = [
${columns.id}${new Date().getTime()}
{ 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 (
) }
},
]
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
🐛 bug 描述
📷 复现步骤
🏞 期望结果
设置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 (
},
]
© 版本信息
🚑 其他信息