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

Remove DOM element instead of hiding it #13

Closed
roszpun opened this issue Jul 23, 2020 · 1 comment
Closed

Remove DOM element instead of hiding it #13

roszpun opened this issue Jul 23, 2020 · 1 comment

Comments

@roszpun
Copy link

roszpun commented Jul 23, 2020

Hello, I'm developing an app, which has mobile and desktop views. Ideally, I would like to display some components conditionally depending on the breakpoints. Currently directive only applies display: none;. Is it possible to remove the DOM element instead?

@reinerBa
Copy link
Owner

Hello, removing is in vue a different thing than hiding.
You can hide with "v-show" and remove with "v-if", with this directive the last is not possible. Because it works in the DOM elements itself.
Other Plugins exists with give you a property that indicates the current display size, you can use this to do something like v-if="big" or v-if="!big".

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

No branches or pull requests

2 participants