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

mip-vue 开发组件,当prerenderAllowed 返回true之后,mounted方法会执行多次 #669

Open
stepli1010 opened this issue Aug 5, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@stepli1010
Copy link

BUG 描述
使用vue方式开发mip组件,当该组件非首屏,然后为了让此组件提前渲染让prerenderAllowed方法返回true,然后发现该组件mounted方法会执行多次(目前发现当该组件最终出现在视口中时一共会执行四次)。

复现步骤
重新复现 Bug 的步骤

  1. mip-cli开发组件(使用vue)
  2. 让某个非首屏的组件prerenderAllowed 返回true
  3. 添加console查看mounted执行次数

期望结果
希望执行一次,或者给出合理的执行次数。

截图
如果合适,添加问题相关的截图

环境及版本信息:

  • OS: mac
  • Browser chrome 模拟h5
  • 浏览器 chrome 75
  • mip-cli 版本 1.5.12

其他信息
已经线下提供URL给邹淼江看过了,具体问题也已经沟通清楚。

@zoumiaojiang zoumiaojiang self-assigned this Aug 6, 2019
@clark-t
Copy link
Contributor

clark-t commented Aug 15, 2019

目前会导致 vue 组件里面如果存在 时,会渲染出两张图片

@mahaina
Copy link

mahaina commented Aug 21, 2019

求问这个issue有定位和fix方案吗~

@clark-t clark-t added the bug Something isn't working label Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants