提问人:Aaron 提问时间:12/8/2022 最后编辑:Aaron 更新时间:12/8/2022 访问量:34
<tr> 不能显示为 <ul> 的子项 -- 如何在我的代码中找到确切的位置
<tr> cannot appear as a child of <ul> -- How to find the exact location in my code
问:
我知道如何在代码中修复此错误。但是,我似乎找不到它的来源。
我在 EmployeeProfile 和 main 中到处寻找。虽然我似乎找不到它。
我也在 chrome 的控制台 document.querySelectorAll('ul tr') 中尝试过。通过它,什么也没返回
react-dom.development.js:88 Warning: validateDOMNesting(...): <tr> cannot appear as a child of <ul>.
in tr (created by main)
in ul (created by main)
in div (created by main)
in div (created by main)
in div (created by main)
in div (created by main)
in main (created by EmployeeProfile)
in div (created by EmployeeProfile)
in div (created by EmployeeProfile)
in div (created by EmployeeProfile)
in div (created by EmployeeProfile)
in div (created by EmployeeProfile)
in EmployeeProfile (created by Connect(EmployeeProfile))
in Connect(EmployeeProfile) (created by Context.Consumer)
in Route (created by subscriptionroute)
in Switch (created by subscriptionroute)
in subscriptionroute (created by Context.Consumer)
in Route (created by DefaultLayout)
in div (created by DefaultLayout)
in div (created by DefaultLayout)
in DefaultLayout (created by Context.Consumer)
in withRouter(DefaultLayout) (created by Connect(withRouter(DefaultLayout)))
in Connect(withRouter(DefaultLayout)) (created by Context.Consumer)
in Route (created by AuthRoute)
in AuthRoute (created by Connect(AuthRoute))
in Connect(AuthRoute) (created by App)
in Switch (created by App)
in Provider (created by App)
in App (created by Context.Consumer)
in withRouter(App) (created by Connect(withRouter(App)))
in Connect(withRouter(App)) (created by Context.Consumer)
in Route (created by MainApp)
in Switch (created by MainApp)
in Router (created by BrowserRouter)
in BrowserRouter (created by MainApp)
in MainApp
in Provider
我也收到这个错误,我无法找到和修复。我想我可能已经找到了位置,尽管输入密钥并不能解决问题,所以我想也许它不是正确的位置?
我基本上只需要有关如何找到有问题的代码行的帮助。有没有一些js我可以用来找到它?比如document.querySelectorAll('ul tr')?
答: 暂无答案
评论
<tr>
<tr
.map()