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

optimize #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

optimize #2

wants to merge 2 commits into from

Conversation

Akiq2016
Copy link

@Akiq2016 Akiq2016 commented May 15, 2018

主要优化点:

  • 将列表数据、起始触摸坐标、左滑展示的操作块宽度,放在Touches中管理 避免在再次传入
  • touchMove、touchEnd 中进行了dataReset,改为仅在touchStart时进行一次初始化 避免频繁调用
  • touchMove、touchEnd 方法 return list 改为 return item。避免直接对列表进行setData,优化性能
  • touchMove 中添加对右滑的拦截
  • touchMove 修复touch手势不放开,left 远大于操作块宽度的显示 bug
  • _getMoveX 和 _getEndX 逻辑一致 合并为 _getMoveWidth
  • delete方法移除,操作块中的具体操作逻辑建议放在业务逻辑页面中去完成

@songzeng2016

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

Successfully merging this pull request may close these issues.

1 participant