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

fix(Sticky): fix sticky wrap empty #5325

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

johnsonwong666
Copy link
Collaborator

#5243
通过监听wrap的高度进行取消fix和高度置0的操作

@landluck landluck self-requested a review April 12, 2023 08:16

observeWrap() {
// 如果子元素没有内容了 高度为0 取消掉fixed
const observer = wx.createIntersectionObserver(this);
Copy link
Contributor

Choose a reason for hiding this comment

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

两个问题

  1. 监听需要在组件卸载时回收
  2. 有没有更好的办法,监听回调在滚动时是否会触发?需要考虑一定的性能问题

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.

None yet

2 participants