回答編集履歴
2
文法の修正
test
CHANGED
@@ -10,7 +10,17 @@
|
|
10
10
|
|
11
11
|
<li v-for="item in itemTypes" :key="item.id">
|
12
12
|
|
13
|
+
<template v-if="item.type === '1'">
|
14
|
+
|
15
|
+
<component-a>
|
16
|
+
|
13
|
-
/
|
17
|
+
</template>
|
18
|
+
|
19
|
+
<template v-else-if="item.type === '2'">
|
20
|
+
|
21
|
+
<component-b>
|
22
|
+
|
23
|
+
</template>
|
14
24
|
|
15
25
|
</li>
|
16
26
|
|
1
誤字修正
test
CHANGED
@@ -30,9 +30,9 @@
|
|
30
30
|
|
31
31
|
itemTypes()=>{
|
32
32
|
|
33
|
-
return this.items.filter(function(){
|
33
|
+
return this.items.filter(function(item){
|
34
34
|
|
35
|
-
return
|
35
|
+
return item.type
|
36
36
|
|
37
37
|
})
|
38
38
|
|