ant-design-vue icon indicating copy to clipboard operation
ant-design-vue copied to clipboard

在axios拦截器里使用message、notification等API,无法使用config provider定义的主题

Open jiangyong1998 opened this issue 1 year ago • 5 comments
trafficstars

  • [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

jiangyong1998 avatar Aug 02 '24 07:08 jiangyong1998

遇到同样的问题,不确定是自己的写法有问题,还是框架自身有bug,跪求解决。

twosoy avatar Aug 07 '24 01:08 twosoy

遇到同样的问题,不确定是自己的写法有问题,还是框架自身有bug,跪求解决。 image image

可以暂时先手动挂载到全局

jiangyong1998 avatar Aug 07 '24 02:08 jiangyong1998

我试试,谢谢。

twosoy avatar Aug 07 '24 03:08 twosoy

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

文档中有提到

gaokun avatar Aug 14 '24 10:08 gaokun

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

github-actions[bot] avatar Oct 14 '24 02:10 github-actions[bot]

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.

github-actions[bot] avatar Oct 22 '25 01:10 github-actions[bot]