gpt4 book ai didi

javascript - 如何在 react 表中合并单元格

转载 作者:行者123 更新时间:2023-12-03 21:01:37 25 4
gpt4 key购买 nike

我正在使用 react-table 并希望根据它们内部的数量合并特定单元格的单元格。它喜欢删除分隔线边框。

它看起来像这样:https://i.imgur.com/BelFNSj.png

我尝试在 Columns 中使用 className通过使用 border-bottom: 1px solid transparent !important;border-top: 1px solid transparent !important; ,但它没有用。
你能告诉我该怎么做吗?
谢谢。

最佳答案

试试名为 colSpan 的内置表格属性,它指定要水平合并多少个单元格。

<TableCell colSpan=2> My Cell </TableCell>

关于javascript - 如何在 react 表中合并单元格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57104967/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com