Open freesaber opened 3 months ago
antd
到最新版本,因为这个问题可能是antd
引起的,见 https://github.com/ant-design/ant-design/issues/48709pro-components
版本到最新,因为这个问题也可能是rc-util
引起的, rc-util
在https://github.com/react-component/util/commit/f9b468ea0bdf8168c34e6ed11e534ee0c051a7c2 这个PR里面修复了这个问题,对应的版本为5.41.0
,pro-components
在https://github.com/ant-design/pro-components/commit/b13468f20880a03f4303d6032544359974653c8c 这个PR里面把rc-util
升级到了^5.43.0
,对应版本为2.7.11
, 所以你要升级pro-components
到2.7.11
及以上版本pro-components
引起的,需要修复
- ant v5.4.0
- 升级你的
antd
到最新版本,因为这个问题可能是antd
引起的,见 ⚠️ Some components throwfindDOMNode is deprecated and will be removed
in React 18.3 / 19 ant-design#48709- 升级你的
pro-components
版本到最新,因为这个问题也可能是rc-util
引起的,rc-util
在react-component/util@f9b468e 这个PR里面修复了这个问题,对应的版本为5.41.0
,pro-components
在b13468f 这个PR里面把rc-util
升级到了^5.43.0
,对应版本为2.7.11
, 所以你要升级pro-components
到2.7.11
及以上版本- 如果还有这个问题,就发出来,可能是
pro-components
引起的,需要修复
- ant v5.4.0
我的版本依赖如下,也会显示这个警告.官网的demo在沙盒中打开也会显示这个问题。
{
"react": "^18.3.1",
"antd": "^5.20.1",
"@ant-design/pro-components": "^2.7.15",
"@ant-design/pro-form": "^2.29.0",
"@ant-design/pro-layout": "^7.19.12",
"@ant-design/pro-provider": "^2.14.9",
"@ant-design/pro-table": "^3.16.6"
}
"@ant-design/pro-components": "^2.7.15",
"antd": "^5.20.1",
"next": "^14.2.4",
"react": "^18",
依赖全最新,使用pro-table组件的页面还是会显示警告。
顶一下,我也是,看着不舒服: "@ant-design/pro-components": "^2.7.13", "antd": "^5.19.1", "react": "^18.3.1", "react-dom": "^18.3.1", "react-icons": "^5.2.1", "react-redux": "^9.1.2", "react-router-dom": "^6.24.1",
+1
+1
+1
+1
有没有已经解决的? "react": "^18.3.1", "react-dom": "^18.3.1","@ant-design/pro-components": "^2.7.15", "antd": "^5.19.2",
+1 "@ant-design/pro-components": "^2.7.15", "antd": "5.20.3",
import { StrictMode } from 'react' import { createRoot } from 'react-dom/client' import { HashRouter } from 'react-router-dom'; import { ConfigProvider } from 'antd'; import zhCN from 'antd/locale/zh_CN'; import App from '@/App'; import './styles/reset.scss'; import './styles/index.scss';
createRoot(document.getElementById('root')!).render(
膈应警告就 pnpm add react@18.2.0 react-dom@18.2.0
+1 全是最新的demo 项目 问题依旧存在 "@ant-design/pro-components": "^2.7.19", "antd": "^5.21.1", "react": "^18.3.1",
"dependencies": { "@ant-design/charts": "^2.2.1", "@ant-design/icons": "^5.5.1", "@ant-design/pro-components": "^2.7.19", "antd": "^5.21.0", "html2canvas": "^1.4.1", "jspdf": "^2.5.2", "lodash": "^4.17.21", "react": "^18.2.0", "react-dom": "^18.2.0", "umi-plugin-keep-alive": "^0.0.1-beta.35" }, 可破
"dependencies": { "@ant-design/charts": "^2.2.1", "@ant-design/icons": "^5.5.1", "@ant-design/pro-components": "^2.7.19", "antd": "^5.21.0", "html2canvas": "^1.4.1", "jspdf": "^2.5.2", "lodash": "^4.17.21", "react": "^18.2.0", "react-dom": "^18.2.0", "umi-plugin-keep-alive": "^0.0.1-beta.35" }, 可破
没用的
"dependencies": { "@ant-design/charts": "^2.2.1", "@ant-design/icons": "^5.5.1", "@ant-design/pro-components": "^2.7.19", "antd": "^5.21.0", "html2canvas": "^1.4.1", "jspdf": "^2.5.2", "lodash": "^4.17.21", "react": "^18.2.0", "react-dom": "^18.2.0", "umi-plugin-keep-alive": "^0.0.1-beta.35" }, 可破
没用的
是我疏忽了,后面证实是ant-pro的问题。在ant是已经解决了的。
开发环境:
页面代码:
控制台警告内容:
截图: