質問編集履歴
4
br
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,7 +2,9 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
[async-with-custom-template(buefy)](https://buefy.org/documentation/autocomplete/#async-with-custom-template)のts実装を試みてますが、
|
5
|
+
[async-with-custom-template(buefy)](https://buefy.org/documentation/autocomplete/#async-with-custom-template)のts実装を試みてますが、
|
6
|
+
|
7
|
+
コールバック関数内の`this`をVueComponentと明示できず、以下のエラーが消せません
|
6
8
|
|
7
9
|
```
|
8
10
|
|
3
補足
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,13 +30,15 @@
|
|
30
30
|
|
31
31
|
```vue
|
32
32
|
|
33
|
+
// https://buefy.org/documentation/autocomplete/#async-with-custom-template のサンプルを簡略化したものになります。
|
34
|
+
|
33
35
|
<template>
|
34
36
|
|
35
37
|
<b-autocomplete
|
36
38
|
|
37
39
|
:data="data"
|
38
40
|
|
39
|
-
placeholder="e
|
41
|
+
placeholder="this is placeholder"
|
40
42
|
|
41
43
|
:loading="isFetching"
|
42
44
|
|
2
version bottom
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,15 +1,3 @@
|
|
1
|
-
##### バージョン
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
- vue 2.6.12
|
6
|
-
|
7
|
-
- nuxt 2.14.5
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
1
|
##### 困っていること
|
14
2
|
|
15
3
|
|
@@ -118,4 +106,16 @@
|
|
118
106
|
|
119
107
|
|
120
108
|
|
109
|
+
##### バージョン
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
- vue 2.6.12
|
114
|
+
|
115
|
+
- nuxt 2.14.5
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
121
|
よろしくお願いします。
|
1
simply source code
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
```
|
20
20
|
|
21
|
-
//
|
21
|
+
// TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
|
22
22
|
|
23
23
|
```
|
24
24
|
|
@@ -92,19 +92,13 @@
|
|
92
92
|
|
93
93
|
getAsyncData: debounce(function(name) {
|
94
94
|
|
95
|
-
//
|
95
|
+
//-----//
|
96
96
|
|
97
|
-
console.log(this);
|
97
|
+
console.log(this); // VueComponent{...} であることを確認
|
98
98
|
|
99
|
-
//
|
99
|
+
this.isFetching; // TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
|
100
100
|
|
101
|
-
this.isFetching;
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
//
|
101
|
+
//-----//
|
106
|
-
|
107
|
-
// ...
|
108
102
|
|
109
103
|
}, 500)
|
110
104
|
|