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

[bug-report] Tabbar组件在某些情况会死循环reflow,导致页面渲染不出来或者崩溃 #567

Closed
hangpingping opened this issue Sep 5, 2019 · 4 comments
Assignees
Labels
bug Something isn't working @Components Components related

Comments

@hangpingping
Copy link

Mand Mobile Version

2.5.1

Vue Version

2.6.1

Model / OS & Browser Info

mac64/chrome76.0.3809.87

Node Version, Package Management Tool

node10.16.2/npm6.11.3

Recurring Links

https://github.com/hangpingping/mand-mobile-tabbar-test

Recurring Steps

1.vue-cli3.1创建一个空项目, 引入minireset.css和mand-mobile
2.修改App内容
3. 运行npm run serve 在chrome中模拟器中在宽度1080, 432, 375中调试

Expectant Behaviors

正常渲染

Actual Behaviors

内容一直渲染不出来, chrome render进程cpu飙到100 %,chrome中debugger paused后call stack 一直在inkwidth reflow

@hangpingping
Copy link
Author

这个问题自迁移到mand-moble2就开始遇到,在tabbar组件添加了console.log
image
image
image
在reflow方法中拿到的current-tab-bar-item的offsetWidth的值一直在两个数中循环,赋给inkwidth导致重新reflow

@supergaojian
Copy link
Collaborator

已经可复现问题,暂时推荐不要在外部使用vw + 百分比包裹tab-bar(内部flex计算不准确)。如果必须使用的话,您可以暂时为md-tab-bar-item添加flex: auto解决问题,我们会在下一个版本更新

@hangpingping
Copy link
Author

我尝试将tab-bar宽度改成50vw,但问题依旧复现,vw + 百分比会导致内部flex计算不准确这种说法不正确

@supergaojian
Copy link
Collaborator

由于我们内置每一个item并没有给默认的flex导致了问题出现,我们会在下一个版本修复这个问题,您可以暂时为md-tab-bar-item添加flex: auto解决问题

@xxyan0205 xxyan0205 added @Components Components related bug Something isn't working labels Sep 18, 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 @Components Components related
Projects
None yet
Development

No branches or pull requests

4 participants