Replies: 12 comments 30 replies
-
我也遇到了这个问题 ,不知道有没有解决方法 |
Beta Was this translation helpful? Give feedback.
-
可以提供下demo吗 |
Beta Was this translation helpful? Give feedback.
-
我也是这个问题,看着这个错太难受了 |
Beta Was this translation helpful? Give feedback.
-
我用 vite 项目创建了一个 demo https://github.com/Wxh16144/antd-41855-demo 主要内容在 |
Beta Was this translation helpful? Give feedback.
-
降了一下版本后没再报错,比如@5.2.1 |
Beta Was this translation helpful? Give feedback.
-
有解决方案了吗? |
Beta Was this translation helpful? Give feedback.
-
可以试试文档里这样 |
Beta Was this translation helpful? Give feedback.
-
这样是可以的
|
Beta Was this translation helpful? Give feedback.
-
不知在Ant Pro应该如何处理? |
Beta Was this translation helpful? Give feedback.
-
import { App, message as antdMessage, } from 'antd'; let message: MessageInstance = antdMessage; function MessageGlobal() { export { message, }; |
Beta Was this translation helpful? Give feedback.
-
Steps to reproduce
无
What is expected?
无
What is actually happening?
无
umi 项目 配置axios拦截器中使用了message,应该脱离的项目上下文环境,如何解决这个问题呢?
控制台提示[antd: message] Static function can not consume context like dynamic theme. Please use 'App' component instead.
Beta Was this translation helpful? Give feedback.
All reactions