idux
idux copied to clipboard
[comp:*] 使用 `container` 替换 `target`
- [x] I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
在 浮层,弹窗,抽屉等组件中,使用 target 来设置容器的目标元素,容易引起误解。
所以用语义更加明确的 container 来代替。
What does the proposed API look like?
涉及的组件有:
- date-picker
- drawer
- dropdown
- image
- menu
- message
- modal
- notification
- select
- time-picker
- tooltip
- tree-select
Translation of this issue:
[comp: *] Use container Replace Target
- [x] i Have Searched The [https://github.com/iduxfe/idux/issues) of this repository and believe That this is not a duplicate.
What proBLEES THIS Feature SOLVE?
In components such as floating layers, populations, drawers, etc., using target to set the target elements of the container, it is easy to cause misunderstandings.
So use semant and more clear container instead.
What does The proposed API Look Like?
The components involved are:
- Date-Picker
- Drawer
- DropDown
- Image
- menu
- Message
- MODAL
- Notification
- SELECT
- Time-Picker
- Tooltip
- Tree-SELECT
- 需要固定 trigger 的,例如: select, menu, date-picker 等组件, container 的 API 被命名为:
overlayContainer - 没有 trigger 的,例如:message, modal, drawer 等组件,container 的 API 被命名为:
container - 上面两个 API 都支持 全局配置
- 此外在 globalConfig.common 里还提供了一个
overlayContainer配置,用于特殊场景下的给所有浮层组件提供一个容器。