ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.1k stars 14.64k forks source link

[Bug Report] el-tooltip is overflow the screen viewport range #21761

Open rencoo opened 2 years ago

rencoo commented 2 years ago

Element UI version

2.15.7

OS/Browsers version

macOS 12.0.1,Chrome 99.0.4844.83

Vue version

2.6.14

Reproduction Link

https://jsfiddle.net/rencoo/8ao7vz3k/6/

Steps to reproduce

  1. set el-tooltip content as a long string without white space
  2. found that el-tooltip content is overflow the screen viewport range

What is Expected?

el-tooltip content will auto break

What is actually happening?

el-tooltip content is overflow the screen viewport range. it should be related to the 'el-tooltip__popper' attr, i think you should set attr 'max-width: calc(100vw - 20px);' for it

rencoo commented 2 years ago

img