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

切换到hidden的组件中,表格宽度渲染不正常 #230

Closed
wekerSnail opened this issue Aug 12, 2019 · 2 comments
Closed

切换到hidden的组件中,表格宽度渲染不正常 #230

wekerSnail opened this issue Aug 12, 2019 · 2 comments
Labels
need help Extra attention is needed

Comments

@wekerSnail
Copy link
Contributor

wekerSnail commented Aug 12, 2019

(必填)填写问题描述 Describe the bug

对于tab切换的组件,在切换到原来hidden的tab时,表格宽度渲染不正常,开启auto-resize之后,切过去可以重渲染成正常宽度,但是会有个一两秒的延迟,体验不好,因为页面每次打开切tab都会这样,我现在的使用场景是在dialog里面,所以每次打开弹框都会这样

(必填)填写能重现问题的链接(jsfiddlecodesandboxjsrunhttps://jsrun.pro/SUbKp/edit

@wekerSnail wekerSnail added the bug Something isn't working label Aug 12, 2019
@xuliangzhan
Copy link
Collaborator

xuliangzhan commented Aug 12, 2019

这本身属于不合理的渲染;可以初始化多个,但不应该在隐藏的标签中去初始化,这是无法计算宽度的
正常的处理逻辑应该是可视之后再进行渲染,非正常渲染请在显示之后使用手动调用 recalculate 方法重新计算,或者设置 auto-resize 属性

@xuliangzhan xuliangzhan added need help Extra attention is needed incorrect call 错误的调用 and removed bug Something isn't working labels Aug 12, 2019
@wekerSnail
Copy link
Contributor Author

手动计算的方式确实可行,渲染速度比auto resize快

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need help Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants