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

refactor(template): 优化小程序 base 模板体积 #7460

Merged
merged 8 commits into from
Sep 2, 2020

Conversation

Chen-jj
Copy link
Contributor

@Chen-jj Chen-jj commented Aug 27, 2020

这个 PR 做了什么?

优化模板体积

  • 只递归 view、cover-view、block、text、slot、slot-view、label、form、scroll-view 组件,其它组件只需输出一层。其中 slot、slot-view、label、form、scroll-view 组件虽然可能会循环引用自身,但不会循环太多层,因此加上了一定的循环层数限制。
  • ad、official-account、open-data、navigation-bar 不需要渲染子元素
  • 利用 wxs 计算三元表达式
  • 第 16 层只需要渲染一个 container

修复 VirtualList 在加载过多图片时出现闪屏

修复模板中 key 的取值错误,由 id 改为 uid

修复 Canvas 默认设置了 type,导致微信小程序旧版本画布 API 不能使用的问题。

这个 PR 是什么类型?

这个 PR 满足以下需求:

  • 提交到 next 分支
  • Commit 信息遵循 Angular Style Commit Message Conventions
  • 所有测试用例已经通过
  • 代码遵循相关包中的 .eslintrc, .tslintrc, .stylelintrc 所规定的规范
  • 在本地测试可用,不会影响到其它功能

这个 PR 涉及以下平台:

  • 微信小程序
  • 支付宝小程序
  • 百度小程序
  • 头条小程序
  • QQ 轻应用
  • 快应用平台(QuickApp)
  • Web 平台(H5)
  • 移动端(React-Native)

@Chen-jj Chen-jj added the V-3 Version - 3.x label Aug 28, 2020
@Chen-jj Chen-jj linked an issue Aug 28, 2020 that may be closed by this pull request
@Chen-jj Chen-jj merged commit 2408752 into next Sep 2, 2020
@Chen-jj Chen-jj deleted the refactor/template branch September 2, 2020 02:28
@Chen-jj Chen-jj linked an issue Sep 3, 2020 that may be closed by this pull request
@wkh2
Copy link

wkh2 commented Sep 7, 2020

太牛了吧👍,测试了下,大小确实减少了不少,优化的好!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V-3 Version - 3.x
Projects
None yet
3 participants