element-plus icon indicating copy to clipboard operation
element-plus copied to clipboard

[Component] [el-select] select 多选时,默认选择1个时,select宽度不会自适应。

Open wcldyx opened this issue 10 months ago • 2 comments

Bug Type: Component

Environment

  • Vue Version: 3.4.21
  • Element Plus Version: 2.6.2
  • Browser / OS: windows chrome 122
  • Build Tool: Vite

Reproduction

Related Component

  • el-select

Reproduction Link

Element Plus Playground

Steps to reproduce

打开复现环境链接

What is Expected?

你能发现select都看不到选了个啥,select 没有宽度

What is actually happening?

希望select能自动适用宽度,让我看到选了个啥

Additional comments

(empty)

wcldyx avatar Mar 27 '24 08:03 wcldyx

不太理解,为什么不给select直接设置一个宽度呢,width:100%跟父容器一样宽也行啊

kankan-web avatar Mar 27 '24 15:03 kankan-web

不太理解,为什么不给select直接设置一个宽度呢,width:100%跟父容器一样宽也行啊

Select 是 100% 宽度的,只是父元素没有宽度。

kooriookami avatar Mar 28 '24 01:03 kooriookami