You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| top | Distance from the top of the viewport, when `placement` is `topRight` or `topLeft` (unit: pixels). | string |`24px`||
78
+
79
+
## FAQ
80
+
81
+
### Why I can not access context, Pinia, ConfigProvider `locale/prefixCls/theme` in notification?
82
+
83
+
antdv will dynamic create Vue instance by `Vue.render` when call notification methods. Whose context is different with origin code located context.
84
+
85
+
When you need context info (like ConfigProvider context), you can use `notification.useNotification` to get `api` instance and `contextHolder` node. And put it in your children:
**Note:** You must insert `contextHolder` into your children with hooks. You can use origin method if you do not need context connection.
102
+
103
+
> [App Package Component](/components/app) can be used to simplify the problem of `useNotification` and other methods that need to manually implant contextHolder.
104
+
105
+
### How to set static methods prefixCls ?
106
+
107
+
You can config with [`ConfigProvider.config`](/components/config-provider#configproviderconfig-4130)
0 commit comments