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

打包后样式高度不是100% #149

Closed
Viin-zx opened this issue Feb 25, 2018 · 6 comments
Closed

打包后样式高度不是100% #149

Viin-zx opened this issue Feb 25, 2018 · 6 comments

Comments

@Viin-zx
Copy link

Viin-zx commented Feb 25, 2018

image

前面两个没问题,总是最后一个就不会计算高度,删掉一个的话就是第二个变成这样
image

image

用的dva框架

@Viin-zx
Copy link
Author

Viin-zx commented Feb 25, 2018

改变下浏览器大小好像就会resize,变成正常的样子,初始化就会出先这样的问题,请问如何解决?

@hustcc
Copy link
Owner

hustcc commented Feb 25, 2018

你看下是不是宽高都是 100px?另外告知下 echarts 版本。

@Viin-zx
Copy link
Author

Viin-zx commented Feb 25, 2018

@hustcc 宽高都是100%,这三个表都是一个组件,每次都是最后一个样式会有问题,触发一下浏览器resize就会变回原样。

image

@hustcc
Copy link
Owner

hustcc commented Feb 25, 2018

你从浏览器开发工具里面,看出问题的那个 dom 结构,看看渲染出来的宽高是不是 100 px。

之前也有遇到过类似的问题。

@Viin-zx
Copy link
Author

Viin-zx commented Feb 25, 2018

@hustcc 是的,在第一张图里面我就截了图,组件设置的高度是 100%, 然后生成的canvas父元素(组件子元素)高度就是100px了, 您看下。

@hustcc
Copy link
Owner

hustcc commented Feb 27, 2018

#150 是一类问题,后面在 #150 中处理。这个先关闭了~

如果有时间,麻烦在 codepen 上做一个可以复现的实例吧!

@hustcc hustcc closed this as completed Feb 27, 2018
hustcc added a commit that referenced this issue Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants