設置 components.header.cell 和 components.body.cell 覆蓋 cell
然後 table header 跟 row 都會有預設的灰色底線,不想要的話直接設置 borderBottomWidth 為 0 就好
import { Button, Table } from 'antd'
//...
export const Component = ({ columns, data ) => {
return (
<Table
columns={columns}
dataSource={data}
components={{
header: {
cell: ({ children, ...props }) => (
<th
{...props}
style={{
backgroundColor: '#fff',
borderBottomWidth: 0,
}}
>
{children}
</th>
),
},
body: {
cell: ({ children, ...props }) => (
<td
{...props}
style={{
backgroundColor: '#fff',
borderBottomWidth: 0,
}}
>
{children}
</td>
),
},
}}
/>
)
}

![[React] Redux Toolkit Query(RTKQ) 基礎使用指南 2 RTKQ logo](https://www.may-notes.com/wp-content/uploads/2023/12/nl9bkr5l1h5ke31vkula-150x150.webp)


![[Weekly] 12/16-12/22 本周紀錄 9 weekly-banner](https://www.may-notes.com/wp-content/uploads/2023/10/jazmin-quaynor-18mUXUS8ksI-unsplash-150x150.jpg)