antd中Table组件,配置固定列
- Table配置属性:
scroll={{
x: true,
y: 'calc(100vh - 240px)', // 可以按需调整y的值
}}
- Table的columns属性对应的数组中,配置各列fixed
fixed: 'right'
如果使用TypeScript:
fixed: 'right' as const,
- Table的columns属性对应的数组中,留一列不设宽度以适应弹性布局,其它列可以设置width为px或%百分比。
浙公网安备 33010602011771号