警告:validateDOMNesting(...):<div>在 tbody 内使用 Accordion 时无法显示为 <tr>警告的子项

问题描述 投票:0回答:1
javascript reactjs accordion react-bootstrap mern
1个回答
0
投票

HTML 表格的正确结构是:

<table>
  <tbody> // optional
    <tr> // row
      <td>anything can be here</td>
      <td>another cell</td>
    </tr>
    ...
  </tbody>
</table>

因此

tr
(行)只能包含
td
(数据)元素。

© www.soinside.com 2019 - 2024. All rights reserved.