情景:在使用element-ui表格时,内容过多,选用属性show-overflow-tooltip="true"进行溢出处理,但是鼠标移上显示时,很不美观,效果如下:

 element-ui表格show-overflow-tooltip="true",鼠标移上去显示的宽度设置

 

 

解决办法:

tooltip的类是el-tooltip__popper,所有设置一下CSS样式控制宽度就行了,css样式代码如下:

<style lang="css">
.el-tooltip__popper{font-size: 14px; max-width:50% } /*设置显示隐藏部分内容,按50%显示*/
</style>

效果如下:

 element-ui表格show-overflow-tooltip="true",鼠标移上去显示的宽度设置

 

相关文章:

  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-19
  • 2022-12-23
  • 2022-02-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-04-26
  • 2021-11-07
  • 2021-07-23
  • 2022-01-23
  • 2021-08-15
  • 2022-12-23
相关资源
相似解决方案