Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] when I using the slot 'reference' of 'el-popover' component in the way of 'v-slot:reference', DOM renders different from the way 'slot=reference' #18586

Closed
shinyruo177 opened this issue Jan 3, 2020 · 3 comments · Fixed by #20424

Comments

@shinyruo177
Copy link

shinyruo177 commented Jan 3, 2020

No description provided.

@element-bot
Copy link
Member

Translation of this issue:

Element UI version

2.11.1

OS/Browsers version

google 79.0.3945.88 (64bit), windows 10 64bit

Vue version

2.6.10

Reproduction Link

https://codepen.io/pen/ (prev link is fake,this link is true http://jsrun.pro/YBWKp/edit )

Steps to reproduce

<title>hello</title> <script src="https://cdn.bootcss.com/vue/2.6.10/vue.common.dev.js"></script></script> <script src="https://unpkg.com/[email protected]/lib/index.js"></script>


3

<script> New Vue ({) El: "#app", Data: { msg: "hello world" } } </script>

cancel the annotation respectively , then 'el-popover' will render different.

What is Expected?

i want to use v-slot right.

What is actually happening?

Codepen logs in to extract the wind and can't share it. I found an http://jsrun.pro/ybwkp/edit as the existing code.
Bug description 1: El Popover has a reference slot. When it is used, the DOM structure rendered with < template slot = reference > and < template V-slot: reference > is different. The latter will cause the click element Popover not to appear.

It's a bug or I used it wrong. I'm a fool. Can you help me?
Codepen login error, I can't share, found a http://jsrun.pro/YBWKp/edit as code in modern times.

Error description: el-popover has a reference slot. When using it, the dom rendered with < template slot = reference > is not the same as the dom rendered with < template v-slot: reference >.

@9-lives
Copy link

9-lives commented Nov 19, 2020

那你能帮帮我吗

@radiorz
Copy link

radiorz commented Jun 16, 2021

那你能帮帮我吗 Could you help meeee?
element version: 2.15.2
vue: 2.6.12

这样就可以用 It works this way:

<el-popover trigger="hover" placement="bottom">
    content....
  <div slot="reference">
    <span>123</span>
    <el-tag>123</el-tag>

</div>
</el-popover>

It doesnt work this way:

<el-popover trigger="hover" placement="bottom">
    content....
  <template v-slot:reference>
    <span>123</span>
    <el-tag>123</el-tag>
  </template>
</el-popover>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants