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

fix: 组件的生命周期响应问题 #531

Merged
merged 3 commits into from Jun 15, 2018

Conversation

Projects
None yet
4 participants
@zysndy
Copy link
Contributor

commented May 22, 2018

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the dev branch for v2.x (or to a previous version branch), not the master branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • All tests are passing
  • New/updated tests are included

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

  1. 修改mpTypecomponent时,组件的ready响应由onReady改为ready,对应微信官方组件的生命周期
  2. 增加组件的生命周期钩子attachedreadymoveddetached
@anchengjian

This comment has been minimized.

Copy link
Member

commented May 24, 2018

补充一下 component-lifestyle 相关的测试到 test/mp/runtime

@zysndy

This comment has been minimized.

Copy link
Contributor Author

commented May 24, 2018

@zysndy

This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2018

@anchengjian 大佬测试用例加上了,麻烦看一下是否有问题~

@anchengjian anchengjian merged commit 4e74485 into Meituan-Dianping:develop Jun 15, 2018

@zysndy zysndy deleted the zysndy:component-lifestyle branch Jun 20, 2018

@Yee1014

This comment has been minimized.

Copy link

commented Jun 22, 2018

问一下组件生命周期这个在哪个版本可以使用?

@anchengjian

This comment has been minimized.

Copy link
Member

commented Jun 27, 2018

最新的版本就可以用,有啥问题么?

sexdevil pushed a commit to sexdevil/mpvue that referenced this pull request Nov 6, 2018

@F-loat

This comment has been minimized.

Copy link
Contributor

commented Dec 11, 2018

这个 pr 解决的场景是什么?ready、attached 这些生命周期只有小程序的 自定义组件 才有,但是目前 mpvue 组件是用 template 实现的,所以不会有 ready 等事件,只有页面的 onReady,而小程序原生的自定义组件应该不经过 mpvue 处理吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.