v-switch syntactic sugar #8085
toniengelhardt
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
why don't you use dynamic components in the case? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There are sometimes cases where you want to display different components/elements based on a state or variable. To handle this case you would usually do something like:
Would be nice if this could be written like:
This could allow also cool things in more complex scenarios like:
Note that this would only be syntactic sugar to make the template more readable and OCD friendly, all the scenarios can also be handled with
v-if
,v-else-if
, etc.Beta Was this translation helpful? Give feedback.
All reactions