v-for
-
Expects:
Array | Object | Number | String
-
Param Attributes:
-
Usage:
Render the element or template block multiple times based on the source data. The directive’s value must use the special syntax
alias (in|of) expression
to provide an alias for the current element being iterated on:123<
div
v-for
=
"item in items"
>
{{ item.text }}
</
div
>
Note using
of
as the delimiter is only supported in 1.0.17+.Alternatively, you can also specify an alias for the index (or the key if used on an Object):
12<
div
v-for
=
"(index, item) in items"
></
div
>
<
div
v-for
=
"(key, val) in object"
></
div
>
The detailed usage for
v-for
is explained in the guide section linked below. -
See also: List Rendering.
Please login to continue.