-
Notifications
You must be signed in to change notification settings - Fork 753
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
range: 百度小程序下获取不到对应的dom #1021
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
delayQuerySelector 本身就是一个 hack |
是啊....但是我总觉得这种碰运气形的加延迟时间,心里没啥谱,虽然本地测试微信和百度端300都没问题 |
小程序端各种行为表现都不一致,Taro UI 组件里有很多代码根据 Taro env 去做判断然后各种 hack。 如果各端表现一致一点就没有 delayQuerySelector 这种情况出现了,然后 Taro 的一个特殊点也是各端直接调用各端的 API,没有强制把各端 API 重新封装然后保持行为一致(这么做工作量太大),所以得框架自行按照各端处理。 |
开发工具 3.5.1 和基础库 3.170.10,Taro 2.1.5 可以在 0ms 延迟下获取到 DOM,不知道是不是你当时的 Taro 版本或者开发工具问题。 |
为了以防万一我改成 30ms 延迟,你下个版本再试一下吧。 |
range组件在百度小程序下,delayQuerySelector(..., 0)获取不到对应的dom,微信小程序下不会,除了把延迟时间0改为300之外还有没有什么比较好的处理方式?
The text was updated successfully, but these errors were encountered: