Skip to content

Commit 1255164

Browse files
author
ntepluhina
committed
Fix intro-7 component
1 parent 9e971e0 commit 1255164

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

src/.vuepress/components/intro-7.vue

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
11
<template>
22
<div id="app-7" class="demo">
33
<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>
55
</ol>
66
</div>
77
</template>
88

99
<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+
]
2618
}
2719
}
28-
</script>
20+
}
21+
</script>

0 commit comments

Comments
 (0)