Replies: 2 comments 7 replies
-
This is a critical part of most templating language. The reason for rejection in Vue 2 is disappointing.
But:
So why is a high usage Also, since this kind of directive pretty low level, I don't think it can be implemented as a plugin since it need to interact with the |
Beta Was this translation helpful? Give feedback.
-
I think I have an Idea on how this can be implemented. Every iterable seems to work with This example demonstrates my point. |
Beta Was this translation helpful? Give feedback.
-
For Vue 3 I would like to submit to your consideration a Vue 2 feature request that was rejected: vuejs/vue#4174
It's a simple way to have content when a
v-for
iteration is empty, which would work similarly tov-if
/v-else
.The original request called it
v-empty
but I don't care about its name.It's nice sugar for something that is very common in UI, but more importantly it's hard to emulate when you are iterating over something that doesn't have a length, such as an iterator/generator.
You can see that even after being closed, comments of the original issues are getting a lot of thumbs up:
Issue itself: 👍 16
vuejs/vue#4174 (comment) 👍 23
vuejs/vue#4174 (comment) 👍 13
What does the proposed API look like?
Or any other name.
Beta Was this translation helpful? Give feedback.
All reactions