-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Closed
Labels
Description
At some situations, plain object isn't the best choise. I tried to render a Map object by v-for, but seems Vue does not support it currently. (Here's a post I created in the Help thread on the forum.)
Hope Vue can provide the for ... of syntax in v-for to iterate over data types like Map and Set.
For example:
const map = new Map();
map.set('key1', 'val1');
map.set('key2', 'val2');and we can render map in this way:
<ul>
<li v-for="[key, val] of map">{{key}} - {{val}}</li>
</ul>Ben52, jamesstidard, dsonet, yabab-dev, jcollado and 205 moreblackst0ne, signal-intrusion, exarus, waspar, juniiorlima and 7 morelmj0011, vectrixdevelops, vladbat00, exarus, gserrg and 29 more