-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: add visible to RenderWhen
component
#1260
Conversation
slidev already includes vue-use which includes the same concept |
How to use vue-use inside markdown without having a component? |
Instead of a new component, maybe we could extend to have |
I've been thinking about this too, but |
I am okay with it being multi-purpose. And the name doesn't limit it to being context-specific. I think having fewer components would help in learning and discovering. |
Alright, I'll change the PR and also use vue-use as suggested by @John98Zakaria. |
RenderWhen
component
@openscript Sorry for talking so long You can I think the secret lies in the fact that slidev slides are just vue components :)
|
Thank you @John98Zakaria for explaining. I think to integrate it into the |
Adds a IsVisible component, which shows it's children only when the component is in the users viewport.
This is especially useful for iframe, for example a youtube player, which should be unloaded when you leave a slide