File tree Expand file tree Collapse file tree 1 file changed +11
-18
lines changed Expand file tree Collapse file tree 1 file changed +11
-18
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div id =" app-7" class =" demo" >
3
3
<ol >
4
- <todo-item v-for =" item in groceryList" v-bind:todo = " item " : key =" item.id" ></ todo-item >
4
+ <li v-for =" item in groceryList" : key =" item.id" >{{ item.text }}</ li >
5
5
</ol >
6
6
</div >
7
7
</template >
8
8
9
9
<script >
10
- import Vue from ' vue/dist/vue.js'
11
- export default {
12
- data () {
13
- return {
14
- groceryList: [
15
- { id: 0 , text: ' Vegetables' },
16
- { id: 1 , text: ' Cheese' },
17
- { id: 2 , text: ' Whatever else humans are supposed to eat' }
18
- ]
19
- }
20
- },
21
- components: {
22
- ' todo-item' : Vue .component (' todo-item' , {
23
- props: [' todo' ],
24
- template: ' <li>{{ todo.text }}</li>'
25
- })
10
+ export default {
11
+ data () {
12
+ return {
13
+ groceryList: [
14
+ { id: 0 , text: ' Vegetables' },
15
+ { id: 1 , text: ' Cheese' },
16
+ { id: 2 , text: ' Whatever else humans are supposed to eat' }
17
+ ]
26
18
}
27
19
}
28
- </script >
20
+ }
21
+ </script >
You can’t perform that action at this time.
0 commit comments