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

API for getting slots programmatically when SFC is built as Custom Element #12498

Open
ihardyslide opened this issue Dec 3, 2024 · 2 comments

Comments

@ihardyslide
Copy link

Vue version

3.4.10

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-xycchc?file=src%2FApp.vue

Steps to reproduce

Run and check empty slots for Custom Element/Web Component

What is expected?

Some way of accessing slots programmatically

What is actually happening?

Impossible to access slots programmatically

System Info

No response

Any additional comments?

I have decided to open another issue regarding this behaviour, because I couldn't find any solution to this problem and all related issues are closed.
I have also re-used the stackblitz example of below mentioned issue, because the reproduction code is still valid.

Related issues I have found:

I was not able to successfully access the props with any of those suggestions in the comments.
Furthermore they all sound like a workaround and not a solution to this problem, in my opinion.

I could also not find any new internal API which is providing this in the docs, maybe there is already something which I was not able to find?

Thanks & BR

@edison1105
Copy link
Member

Not sure if this will be fix since #6142 (comment)

@ihardyslide
Copy link
Author

ihardyslide commented Dec 10, 2024

I understood that comment in a way, that the same API (useSlots) can not be used, but a new one would make more sense.
So I would imagine e.g. something like useNativeSlots would be possible (just my naive assumption, I have no clue about Vue internals).

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

No branches or pull requests

2 participants