Skip to content

Conversation

@Siykt
Copy link

@Siykt Siykt commented Mar 22, 2023

boss直聘

Copy link
Owner

@RobinYang11 RobinYang11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reconsitution use createPortal

* @returns
*/
export function getWindowSize() {
const el = document.createElement('div');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tips

你了解createPortal() 函数吗?能不能 把动态元素限制在指定的元素内 而不是append 到body上。放到body下,当页面滚动,你的浮框不能跟随!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没注意, 逻辑上无论是自定义children还是直接append body, 最终还是这么加的, 可以提供一个getPopupContainer参数

如需跟随滚动修改fixed为absolute即可

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

boss 上人太多了,你boss 上 回复我下

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你有时间 解决下冲突呗

@RobinYang11
Copy link
Owner

@Siykt
Copy link
Author

Siykt commented Mar 24, 2023

More Feature

@Siykt Siykt reopened this Mar 24, 2023
@Siykt
Copy link
Author

Siykt commented Mar 24, 2023

有亿点报错, 搞不定, 等重构吧

@Siykt Siykt changed the title Feat: 简单实现了一下Popover Feat: Popover Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants