ant-design-vue/components/config-provider/index.zh-CN.md

16 lines
506 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

## 使用
ConfigProvider 使用 Vue 的 [provide / inject](https://vuejs.org/v2/api/#provide-inject) 特性,只需在应用外围包裹一次即可全局生效。
````html
<a-config-provider :getPopupContainer="getPopupContainer">
<app />
</a-config-provider>
````
## API
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| getPopupContainer | 弹出框Select, Tooltip, Menu 等等)渲染父节点,默认渲染到 body 上。 | Function(triggerNode) | () => document.body |