Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[comp:*] 使用 container 替换 target #748

Closed
1 task done
danranVm opened this issue Feb 9, 2022 · 2 comments · Fixed by #1122
Closed
1 task done

[comp:*] 使用 container 替换 target #748

danranVm opened this issue Feb 9, 2022 · 2 comments · Fixed by #1122
Assignees
Labels

Comments

@danranVm
Copy link
Member

danranVm commented Feb 9, 2022

  • 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
@idux-bot idux-bot bot added the Comp:* label Feb 9, 2022
@idux-bot
Copy link

idux-bot bot commented Feb 9, 2022

Translation of this issue:

[comp: *] Use container Replace Target

  • 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

@danranVm
Copy link
Member Author

danranVm commented Sep 8, 2022

  • 需要固定 trigger 的,例如: select, menu, date-picker 等组件, container 的 API 被命名为: overlayContainer
  • 没有 trigger 的,例如:message, modal, drawer 等组件,container 的 API 被命名为: container
  • 上面两个 API 都支持 全局配置
  • 此外在 globalConfig.common 里还提供了一个 overlayContainer 配置,用于特殊场景下的给所有浮层组件提供一个容器。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant