質問編集履歴
3
コード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -50,11 +50,11 @@
|
|
50
50
|
|
51
51
|
})
|
52
52
|
|
53
|
-
.then(re
|
53
|
+
.then(res => {
|
54
54
|
|
55
55
|
if (res.data) {
|
56
56
|
|
57
|
-
this.arr = res.data
|
57
|
+
this.parent.arr = res.data
|
58
58
|
|
59
59
|
}
|
60
60
|
|
2
コードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -29,6 +29,36 @@
|
|
29
29
|
arr: [/* ... */]
|
30
30
|
|
31
31
|
}
|
32
|
+
|
33
|
+
}
|
34
|
+
|
35
|
+
},
|
36
|
+
|
37
|
+
mounted() {
|
38
|
+
|
39
|
+
this.getArr()
|
40
|
+
|
41
|
+
},
|
42
|
+
|
43
|
+
methods: {
|
44
|
+
|
45
|
+
getArr() {
|
46
|
+
|
47
|
+
axios.get(url, {
|
48
|
+
|
49
|
+
params: {/* ... */}
|
50
|
+
|
51
|
+
})
|
52
|
+
|
53
|
+
.then(red => {
|
54
|
+
|
55
|
+
if (res.data) {
|
56
|
+
|
57
|
+
this.arr = res.data
|
58
|
+
|
59
|
+
}
|
60
|
+
|
61
|
+
})
|
32
62
|
|
33
63
|
}
|
34
64
|
|
1
コメント変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -60,7 +60,7 @@
|
|
60
60
|
|
61
61
|
mounted() {
|
62
62
|
|
63
|
-
console.log(this.arr) //
|
63
|
+
console.log(this.arr) // [__ob__: Observer] (データは存在しない)
|
64
64
|
|
65
65
|
console.log(this.$props.arr) // undefined
|
66
66
|
|