-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
问题描述
最近使用movable-view做了一个拖拽排序的功能,但是由于需要touchmove事件频繁setState来更新movable-view的坐标,导致Android的上的性能体验很差,IOS不会。
看了微信的文档,这种情况可以使用WXS来解决,请问Taro中能否使用WXS?如何使用呢?
参考文档: https://developers.weixin.qq.com/miniprogram/dev/framework/view/interactive-animation.html
https://developers.weixin.qq.com/miniprogram/dev/framework/performance/tips.html
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
taro-bot commentedon May 6, 2019
欢迎提交 Issue~
如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏
如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。
Good luck and happy coding~
luckyadam commentedon May 6, 2019
频繁 setState 来更新可以通过加节流来尝试解决
Rychou commentedon May 6, 2019
movable-view这种需要即时更新坐标信息的也能节流吗?Miantang commentedon May 6, 2019
试过节流,这样动画掉帧十分厉害
Rychou commentedon May 6, 2019
目前打算在Taro编译之后,自己在小程序开发者工具中写wxs代码
taro-bot commentedon May 6, 2019
Hello~
您的问题楼上已经提供了解决方案,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。
如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。
Good luck and happy coding~
Miantang commentedon May 7, 2019
这样就很恶心了,每次编译都要重新修改dist文件。
Miantang commentedon May 7, 2019
没有计划支持wxs的么?对于一些性能要求高的交互场景,只能通过wxs避免 逻辑线程和视图线程的频繁通信损耗
Rychou commentedon May 7, 2019
那倒不用,在dist下面添加个.wxs的文件,重新编译文件还在的。
我昨天用wxs优化了,晚点写个文章总结一下好了。不过最好还是Taro自己支持wxs
Miantang commentedon May 7, 2019
wxs是在,但是你是还是需要去修改引用它的wxml吧?难道把wxs组件写在taro的jsx中吗
Rychou commentedon May 7, 2019
@luckyadam
试过了,可以不修改wxml。晚点总结了后发文章到时候给你链接吧。不过这里还是希望Taro能支持wxs
Rychou commentedon May 8, 2019
@Miantang 小程序Android端movable-view拖拽卡顿掉帧的优化可以参考一下,不过最好还是Taro能够支持WXS的编程。
luckyadam commentedon May 8, 2019
@Rychou 这个优化很棒啊,我们看一下如何支持一下
不过,这里是不是也可以不用 wxs,直接把这个方法写到类里不行么
28 remaining items
nelk98 commentedon Apr 13, 2022
2022了还有望支持吗?
zhoulujun commentedon Oct 27, 2022
2023了还有望支持吗?
oplknm11 commentedon Dec 14, 2022
2023了还有望支持吗?
harwinvoid commentedon Dec 16, 2022
2023了还有望支持吗?
youmengme commentedon Mar 21, 2023
2023了还有望支持吗?
nelk98 commentedon Mar 21, 2023
2023了还有望支持吗?
daniel-duan commentedon Mar 23, 2023
2023了还有望支持吗?
yanchengqu commentedon Apr 14, 2023
2023年4月14日了,还不支持吗?或者有更好方案也行
SuJunming commentedon Jun 26, 2023
2023年6月26日了,还不支持吗?或者有更好方案也行.
qsj919 commentedon Jun 27, 2023
请问具体应该怎么写呢
youmengme commentedon Dec 8, 2023
2023年12月08日了,还不支持吗?或者有更好方案也行.
youmengme commentedon Feb 2, 2024
2024了还有望支持吗?
Chen-jj commentedon Apr 2, 2024
Taro v3.6.25 开始支持:https://docs.taro.zone/docs/optimized#%E4%BD%BF%E7%94%A8-wxs
imtns commentedon Aug 29, 2024
vue 不打算支持了吗?