ant-design-vue
ant-design-vue copied to clipboard
在axios拦截器里使用message、notification等API,无法使用config provider定义的主题
- [x] I have searched the issues of this repository and believe that this is not a duplicate.
Version
4.2.3
Environment
"vue": "^3.4.29"
Reproduction link
Steps to reproduce
使用app组件包裹应用,基础用法和全局场景 (pinia 场景)都尝试过
What is expected?
可以正常显示
What is actually happening?
报错:useGlobalStore(...).message?.success is not a function
遇到同样的问题,不确定是自己的写法有问题,还是框架自身有bug,跪求解决。
遇到同样的问题,不确定是自己的写法有问题,还是框架自身有bug,跪求解决。
![]()
可以暂时先手动挂载到全局
我试试,谢谢。
https://antdv.com/components/message-cn#%E4%B8%BA%E4%BB%80%E4%B9%88-message-%E4%B8%8D%E8%83%BD%E8%8E%B7%E5%8F%96-context%E3%80%81pinia-%E7%9A%84%E5%86%85%E5%AE%B9%E5%92%8C-configprovider-%E7%9A%84-locale-prefixcls-theme-%E7%AD%89%E9%85%8D%E7%BD%AE%EF%BC%9F
文档中有提到
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.