reactjs 在 div 上面加 contentEditable="true" 的时候报警告怎么处理?如图

小白
  • 243
index-fcc9874e.js:53908 Warning: A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.
    in div (created by c1)
    in div (created by c1)
    in c1 (created by CssMagic)
    in div (created by CssMagic)
    in CssMagic (created by Route)
    in Route
    in Switch
    in div
    in Router (created by BrowserRouter)
    in BrowserRouter

clipboard.png

图片描述

回复
阅读 3.7k
2 个回答

在contentEditable上添加suppressContentEditableWarning="true" V15以上可用

我感觉无法处理,要么你就不要加contentEditable

你知道吗?

宣传栏