element-plus [Bug Report] Using the dynamic component reference el-cascader, the label for all options are blank

f8rj6qna  于 2022-10-21  发布在  其他
关注(0)|答案(2)|浏览(203)

Element Plus version

1.3.0-beta.5

OS/Browsers version

Chrome 95.0.4638.54

Vue version

3.2.26

https://codepen.io/cjq02/pen/JjrzJOJ

Steps to reproduce

click el-cascader input, then you can see the result

What is Expected?

Displays the names of all options

What is actually happening?

the label for all options are blank

kcugc4gi

kcugc4gi1#

@cjq02

the problem is caused by <slot>

i don't understand why do you use a <slot> at here

5f0d552i

5f0d552i2#

I use dynamic components to load some element plus controls, for most controls the slot is unnecessary, but some controls are not. Such as el-select, it needs slot to mount options.

for example:

I tried to use v-if to hide the slot, but it fails.

相关问题