Closed
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>