-
Notifications
You must be signed in to change notification settings - Fork 49
Feat: Popover #5
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
base: dev
Are you sure you want to change the base?
Conversation
RobinYang11
left a comment
There was a problem hiding this 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'); |
There was a problem hiding this comment.
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下,当页面滚动,你的浮框不能跟随!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please refer https://react.dev/reference/react-dom/createPortal
There was a problem hiding this comment.
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即可
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boss 上人太多了,你boss 上 回复我下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你有时间 解决下冲突呗
|
please refer https://react.dev/reference/react-dom/createPortal |
|
More Feature |
|
有亿点报错, 搞不定, 等重构吧 |
boss直聘