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

table: setwidth for each td>div.cell.el-tooltip element(#2198,#3128) #4157

Merged
merged 1 commit into from
May 5, 2017

Conversation

renxia
Copy link
Contributor

@renxia renxia commented Apr 12, 2017

Please makes sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow Element's contributing guide (中文 | English).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer relative issues for you PR.

对设置了 show-overflow-tooltip 属性的元素强制设置宽度
解决 table 组件 show-overflow-tooltip 在 Safari 上无效的问题
#2198,#3128

@renxia renxia force-pushed the dev branch 2 times, most recently from 138862d to db12e5c Compare April 12, 2017 11:51
@renxia renxia changed the title table: setheight for each td element(#2198,#3128) table: setheight for each td>div.cell.el-tooltip element(#2198,#3128) Apr 12, 2017
@liril-net
Copy link
Contributor

会影响 tooltip 的显示。
image

@renxia
Copy link
Contributor Author

renxia commented Apr 19, 2017

@liril-net
和盒式模型有关。
这么算起来还要减去 padding 和 margin 的值,orz...

@renxia
Copy link
Contributor Author

renxia commented Apr 19, 2017

@liril-net
看了下盒模型本来就是 box-sizing: border-box;
是在 Safari 下最小宽度不能小于 padding-left+padding-right的大小(36px),否则就会挤破。

这算是另外一个问题了,即使没有设置 show-overflow-tooltip 属性的元素也会有问题

@renxia
Copy link
Contributor Author

renxia commented Apr 19, 2017

@liril-net @Leopoldthecoder
有两种解决方案:

  1. .cell 添加最小宽度样式:min-width:50px
  2. 调整间距时计算 width,最小不能小于 50

我觉得第一种简单又合适

@renxia renxia changed the title table: setheight for each td>div.cell.el-tooltip element(#2198,#3128) table: setwidth for each td>div.cell.el-tooltip element(#2198,#3128) Apr 19, 2017
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

Successfully merging this pull request may close these issues.

None yet

4 participants