Comments (8)
对的,当时考虑的是,滑动时应该到了边缘,无法形成反向的滑动。
因此,可以只做一次判断,提高性能。
如果确实有反向滑动的场景,可以考虑解开这个限制,实时判断滑动方向。
from pull-element.
要的,需要通过触发正确的onPullDirection
函数来判断下一页是哪一页,因为我基于这个做了一个autoHeight
功能,每一页高度不同,滑动过程中需要改变容器高度,所以需要知道下一页的高度。
from pull-element.
好的,我找个时间升级一下
from pull-element.
@RyanLiu0235 我试了一下,不能简单放开 axis
和 action
的自由判断。
-
pull-effect 触发场景是,用户拖动超过了滚动边界
-
用户可以在超过边界的地方(如下拉),来回拖动,但并未进入滚动边界内部
-
此时 axis/action 应该保持在 y 轴和
pullDown
的状态
可否提供一下脱敏的 demo,以便我们正确理解要解决的问题是什么?有没有其它解决方式?
from pull-element.
不太行,代码量比较大,不太好搞。。。
from pull-element.
好的,我再研究研究,有进展会在这里跟进。
from pull-element.
@RyanLiu0235 我在 v1.1.4 添加了 detectBoundary
的支持,可以在检测到边界时结束 pull-effect。
相当于开启左拉以后,无法反向去右拉,右拉到边界就停止了。
不知道有没有帮助。
设置 detectBoundary: true
参数可以开启这个功能。
from pull-element.
我拉了你的demo,发现这个有问题,只能检测单边的,你可以用demo里的swiper测试一下。而且这样也导致了滑动不连贯。
我手动关了action的单次校验判断,发现我还得手动去检测方向改变了之后下一页是否已经拖出来了。
看来要实现这个功能我还得多琢磨琢磨了。
感谢工业聚~
from pull-element.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pull-element.