ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.12k stars 14.64k forks source link

[Bug Report] Tooltip, component in slot cannot access vuex store #19522

Open tokidoki11 opened 4 years ago

tokidoki11 commented 4 years ago

Element UI version

2.13.2

OS/Browsers version

MacOS

Vue version

2.6.11

Reproduction Link

https://codesandbox.io/s/element-ui-repro-zfyyo?file=/src/components/Inside.vue

Steps to reproduce

There is component named Inside.vue which is called from HelloWorld.vue

HelloWorld.vue has element UI tooltip component and slot is filled using Inside.vue component

What is Expected?

context.root.$store is defined on both of HelloWorld.vue and Inside.vue

What is actually happening?

HelloWorld.vue has context.root.$store defined but none on Inside.vue

tokidoki11 commented 4 years ago

It could be because it is string interpolated in the end because it asked for string.

I wonder if support for components inside slot will be there this will be helpful

stale[bot] commented 3 years ago

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.