react 的进阶

一 react 中table报错

validateDOMNesting(...): <tr> cannot appear as a child of <table>. See Zujian > table > tr. Add a <tbody> to your code to match the DOM tree generated by the browser.

原因:在React中<tr>元素不可以作为<table>元素的直接子元素

解决 :tr外包上tbody

posted @ 2018-09-29 17:06  十辰子  阅读(193)  评论(0编辑  收藏  举报