8000 also support "of" delimiter in v-for · lrenc/vue@a3faec2 · GitHub
[go: up one dir, main page]

Skip to content

Commit a3faec2

Browse files
committed
also support "of" delimiter in v-for
1 parent 4d09023 commit a3faec2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/directives/public/for.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ const vFor = {
3131
],
3232

3333
bind: function () {
34-
// support "item in items" syntax
35-
var inMatch = this.expression.match(/(.*) in (.*)/)
34+
// support "item in/of items" syntax
35+
var inMatch = this.expression.match(/(.*) (?:in|of) (.*)/)
3636
if (inMatch) {
3737
var itMatch = inMatch[1].match(/\((.*),(.*)\)/)
3838
if (itMatch) {

0 commit comments

Comments
 (0)
0