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

ScrollNav存在prepend内容的情况下,有两个bug #500

Closed
whm-js opened this issue Jun 5, 2019 · 8 comments
Closed

ScrollNav存在prepend内容的情况下,有两个bug #500

whm-js opened this issue Jun 5, 2019 · 8 comments
Assignees

Comments

@whm-js
Copy link

whm-js commented Jun 5, 2019

条件:ScrollNav存在prepend内容的情况下。
1、页面滚动状态下且导航栏还没有吸附在顶部,点击导航会直接滚动到底部;
2、页面停止状态下且导航栏还没有吸附在顶部,点击导航,导航栏不会吸附在顶部
用default例子随便加点prepend就可以重现

@dolymood
Copy link
Contributor

dolymood commented Jun 5, 2019

表示没有复现,不管是default 还是 自定义,逻辑其实都是一样的。

如果default有问题 那自定义也会有问题。

@whm-js
Copy link
Author

whm-js commented Jun 5, 2019

@dolymood
微信图片_20190605201000

    我就加了个prepend,页面加载完成直接点击第一个label以外的label就会出现第二个问题,滚动的位置是对的,但是导航栏没有吸附。用ScrollNav源码试了一下好像是scrollHandler事件只执行了一次。
     第二个问题是页面在滚动,但是还没有超过导航栏的时候,点击第一个label以外的label。导航栏可以吸附,但是滚动条直接就滚到最底部了,没有跳到点击的label对应的panel。
   难道是我打开的方式不对?请再验证一下,如果重现不了就算了

@dolymood
Copy link
Contributor

dolymood commented Jun 6, 2019

首先得确定你的容器的 100% 是有效的,目测是这个100% 无效的感觉。

@whm-js
Copy link
Author

whm-js commented Jun 6, 2019

html body #app都设置了100%,scroll滚动是没有问题的

@dolymood
Copy link
Contributor

dolymood commented Jun 6, 2019

还是提供完整示例看下吧,我试验的官网的两个示例都是没问题的

@whm-js
Copy link
Author

whm-js commented Jun 6, 2019

@dolymood
https://github.com/whm-js/scrollnav_test
我上传了一个示例,你试试。那两种情况都是导航没有吸附的情况下发生的哦

@dolymood
Copy link
Contributor

简单测试了下,貌似和Vue版本有关系,我这边先看下

@dolymood
Copy link
Contributor

bbfbe03

1.12.24 修复了这个问题

@dolymood dolymood self-assigned this Jun 11, 2019
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

No branches or pull requests

2 participants