Skip to content

Commit 899d810

Browse files
committed
fix style in list example
1 parent c599795 commit 899d810

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/v2/guide/list.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ However, this won't automatically pass any data to the component, because compon
230230
v-for="(item, index) in items"
231231
v-bind:item="item"
232232
v-bind:index="index"
233-
v-bind:key="item.id">
234-
</my-component>
233+
v-bind:key="item.id"
234+
></my-component>
235235
```
236236

237237
The reason for not automatically injecting `item` into the component is because that makes the component tightly coupled to how `v-for` works. Being explicit about where its data comes from makes the component reusable in other situations.

0 commit comments

Comments
 (0)