southliu / react-admin

React、Typescript、Vite、Antd等技术开发中后台项目解决方案,支持keepalive功能,react-redux状态管理,UnoCSS,动态菜单,国际化i18n,虚拟滚动表格。

Home Page:https://southliu.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

全局message 控制台提示[antd: message] Static function can not consume

Hyebin98 opened this issue · comments

commented

暂时的解决方法:ant-design/ant-design#41855

commented

使用useApp()解决: https://ant.design/components/app-cn#%E5%9F%BA%E7%A1%80%E7%94%A8%E6%B3%95

axios拦截器中使用了antd的message组件 如果在登录页面密码错误 控制台就会有这个警告
image

commented

暂时的解决方案 你可以看一下
ant-design/ant-design#41855 (comment)

commented

好的,我研究一下

commented

感谢!已解决