Problem when use v-else or v-else-if with v-for.
See original GitHub issueVue.js version
2.0.3
Reproduction Link
https://jsfiddle.net/7bhmonyv/1/ https://jsfiddle.net/7bhmonyv/3/ (Resolution)
Steps to reproduce
- Use
v-if
withv-for
inv-for
. - And then use
v-else-if
orv-else
withv-for
.
What is Expected?
A
- 1
- 2
- 3
- 4
- 5
- 6
B
- 1
- 2
- 5
- 7
- 8
- 1
C
- [6]
- [3]
- [6]
- [2]
- [7]
- [3]
What is actually happening?
A
- 1
- 2
- 3
- 4
- 5
- 6
B
- 1
- 2
- 5
- 7
- 8
- 1
- 1
- 2
- 5
- 7 …
C
- [6]
- [3]
- [6]
- [2]
- [7]
- [3]
- [6]
- [3]
- [6]
- [2]
- [7]
- [3] …
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Else clause on Python while statement - syntax - Stack Overflow
The else clause is only executed when your while condition becomes false. If you break out of the loop, or if an exception...
Read more >'Versus' vs. 'Verses' - Merriam-Webster
Versus is a preposition, with the meaning of “against,” or “in contrast to or as the alternative of.” In use in English since...
Read more >Common Writing Problems & How to Fix Them
Here are brief descriptions of common writing problems. ... If you think "identify with" means anything else, you're suggesting that you think literary ......
Read more >Proverbs 4:23 - Above all else, guard your heart, for ...
23 Keep thy heart with all diligence; for out of it are the issues of life. ESV. 23 Keep your heart with all...
Read more >Congregational Conflict Resolution And The Use Of Scriptures
Proverbs chapter 14, verse 17 touches on the problem of being quick to anger: “ A quick tempered man acts foolishly…”. On the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Currently v-for has higher priority. Maybe we need to make it explicitly in the document.
This is expected behavior, we will improve the docs to make the priority more obvious.
In the meanwhile your template can be simplified with a filter: https://jsfiddle.net/7bhmonyv/4/