Skip to content

Commit 5638e98

Browse files
committed
add undocumented range feature of v-repeat
1 parent ffb9b2f commit 5638e98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/api/directives.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,12 @@ Will render:
126126
### v-repeat
127127

128128
- This directive creates child Vue instances.
129-
- This directive requires the value to be an Array or Object.
129+
- This directive requires the value to be an Array, Object or Number.
130130
- This directive can trigger transitions.
131131
- This directive accepts an optional argument.
132132
- Directive params: `trackby`
133133

134-
Create a child ViewModel for every item in the binding Array. These child ViewModels will be automatically created / destroyed when mutating methods, e.g. `push()`, are called on the Array.
134+
Create a child ViewModel for every item in the binding Array or Object. If the value is a whole Number then that many child ViewModels are created. These child ViewModels will be automatically created / destroyed when mutating methods, e.g. `push()`, are called on the Array or Object, or the number is increased or decreased.
135135

136136
When no argument is provided, the child ViewModel will directly use the assigned element in the Array as its `$data`. If the value is not an object, a wrapper data object will be created and the value will be set on that object using the alias key `$value`.
137137

0 commit comments

Comments
 (0)