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

picker及picker-view 选择选项时,需要等一会才能获取新值。当客户滑动选择某一项时,若马上点击确定就会出现选不上值得问题,选择结果是之前的值。如果新增一个监听滚动过程的事件可能会解决。 #278

Closed
shineGG opened this issue Apr 6, 2019 · 2 comments

Comments

@shineGG
Copy link

shineGG commented Apr 6, 2019

No description provided.

@powerlau
Copy link

powerlau commented May 3, 2019

这个问题我也遇到了,不知道怎么解决的

@shineGG
Copy link
Author

shineGG commented May 4, 2019

这个问题不仅是h5上有,5+app及其他端也出现了。我之前看过使用vue重写一个picker组件,其滑动选择之后onchange响应回来的值与uni-app picker组件onchange事件响应回来的值一样,有延迟,原因是该vue组件使用setTimeout做了处理,有0点几秒的时间,也就是本来就是马上选上了,但是源码里面写了定时器来阻止马上选择上,可能是为了防抖或者是节流。我将该定时器去掉后,就能马上获取数据了。但是uni-app picker组件是原生组件我不知道源码是怎么样的,不知道是否可以自己修改。然后不知道是否有必要延迟响应,但是其他app如:企业微信的picker组件没有延迟。

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