element [Bug Report] el-divider doesn't work with v-show

dxxyhpgq  于 4个月前  发布在  其他
关注(0)|答案(3)|浏览(90)

Element UI version

2.13.2

OS/Browsers version

win10/Chrome userAgent: 83.0.4103.97

Vue version

2.6.10

https://codepen.io/xianshenglu/pen/YzwNZJp

Steps to reproduce

just see the demo

What is Expected?

the two el-divider shouldn't show

What is actually happening?

<el-divider v-show="list.length===0"> shows

mlmc2os5

mlmc2os51#

Translation of this issue:

Element UI version

2.13.2

OS/Browsers version

win10/Chrome userAgent: 83.0.4103.97

Vue version

2.6.10

https://codepen.io/xianshenglu/pen/YzwNZJp

Steps to reproduce

Open the demo directly

What is Expected?

Both El dividers do not display

What is actually happening?

shows

4smxwvx5

4smxwvx52#

If change the el-divider to div, v-show would work.
The reason is that the source code is using functional in the template . And the deeper reason is a bug of vue-loader .
I suggest you change the implementation of el-divider instead of using functional component.

ghhkc1vu

ghhkc1vu3#

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

相关问题