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

Trigger a warning when v-show and other incompatible directives are used on <template> #10786

Open
mrleblanc101 opened this issue Oct 31, 2019 · 0 comments
Labels
discussion warnings related to development warnings

Comments

@mrleblanc101
Copy link

What problem does this feature solve?

Hi,

I lost quite some time trying to figure out when my code didn't work.
The error was on my part, not vue, but i think Vue should trigger an error in this case.

The problem is that you CANNOT use v-show on a <template> tag, which make sense since v-show add inline style to the node and the <template> tag does not render a node.

What does the proposed API look like?

A Vue warning/error should suggest changing the v-if (if possible) or change the <template> tag for a DOM element (like a <div>)

@posva posva changed the title v-show on <template> should trigger warning/error Trigger a warning when v-show and other incompatible directives are used on <template> Oct 31, 2019
@posva posva added discussion warnings related to development warnings labels Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion warnings related to development warnings
Projects
None yet
Development

No branches or pull requests

2 participants