ascoders / gaea-editor

Design websites in your browser. A smart web editor!

Home Page:https://gaeajs.github.io/gaea-site/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

create-react-app 创建的项目,拓展 antd 的 Button 组件作为自定义组件时,报错

cag2050 opened this issue · comments

create-react-app 创建的项目,拓展 antd 的 Button 组件作为自定义组件时,在拖动自定义的 AntdButton 到 Container 中时报错:Warning: React does not recognize the Textprop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercasetext instead. If you accidentally passed it from a parent component, remove it from the DOM element.
复现项目地址:https://github.com/cag2050/antd_mobx_demo ,运行:npm run dev,报错页面地址:http://localhost:8887/gaea_editor

你代码中 <Button {...this.props}/> 把 editSetting 这个非 DOM 属性也加到 Button 上了,所以 React 报了 Warning。与 GaeaEditor 无关。