element-plus [Component] [cascader] el-cascader goes out of screen

yyyllmsg  于 5个月前  发布在  Go
关注(0)|答案(3)|浏览(54)

Bug Type: Component

Environment

  • Vue Version: 3.2.47
  • Element Plus Version: 2.3.4
  • Browser / OS: Chrome
  • Build Tool: Vite

Reproduction

  • el-cascader

Element Plus Playground

Steps to reproduce

  1. Disable horizontal scroll
  2. Add el-cascader to view
  3. Add 4 options with children
  4. Open cascader and select option
  5. Its impossible to select the last option if screen is to small

What is Expected?

Last panel always fully visible

What is actually happening?

The last panel is out of screen

Additional comments

(empty)

pu3pd22g

pu3pd22g1#

Add below styling to Element plus playground somehow it keeps getting removed.

<style>
  body {
    overflow-x: hidden;
  }
</style>
ccrfmcuu

ccrfmcuu2#

At present, this kind of scenario may only consider adding overflow-x: auto to .el-cascader-panel .

c7rzv4ha

c7rzv4ha3#

Yes, thats also our current temporary solution but it would be great if the panels don't fit on screen the .el-cascader__dropdown gets a right: 5px; style instead of the current auto.

相关问题