質問編集履歴
2
指摘頂いた内容を反映
test
CHANGED
File without changes
|
test
CHANGED
@@ -46,29 +46,43 @@
|
|
46
46
|
|
47
47
|
import axios from 'axios'
|
48
48
|
|
49
|
+
// export let state:RootState;
|
49
50
|
|
51
|
+
export const state = (): RootState => ({
|
50
52
|
|
53
|
+
article:null,
|
54
|
+
|
51
|
-
|
55
|
+
articles: []
|
56
|
+
|
57
|
+
})
|
52
58
|
|
53
59
|
|
54
60
|
|
55
61
|
export const mutations: MutationTree<RootState> = {
|
56
62
|
|
57
|
-
|
63
|
+
setArticle(state: RootState, article: Article): void {
|
58
64
|
|
59
|
-
state.article
|
65
|
+
state.article = article
|
60
66
|
|
61
67
|
}
|
62
68
|
|
63
69
|
}
|
64
70
|
|
71
|
+
|
72
|
+
|
65
73
|
export const actions: ActionTree<RootState, any> = {
|
66
74
|
|
67
|
-
async getArticle({ commit }, { payload }){
|
68
75
|
|
69
|
-
commit("getArticleMutate", payload.id)
|
70
76
|
|
77
|
+
async getArticle({ commit }, { payload }:any){
|
78
|
+
|
79
|
+
let article:Article
|
80
|
+
|
81
|
+
article.id = payload.id
|
82
|
+
|
83
|
+
commit("setArticle", payload.id)
|
84
|
+
|
71
|
-
}
|
85
|
+
},
|
72
86
|
|
73
87
|
}
|
74
88
|
|
@@ -86,7 +100,9 @@
|
|
86
100
|
|
87
101
|
export interface RootState {
|
88
102
|
|
103
|
+
article:Article,
|
104
|
+
|
89
|
-
articles:Article[]
|
105
|
+
articles:Article[]
|
90
106
|
|
91
107
|
}
|
92
108
|
|
@@ -98,21 +114,19 @@
|
|
98
114
|
|
99
115
|
```log
|
100
116
|
|
101
|
-
ERROR in C:\Users\myProject\store\index.ts
|
102
|
-
|
103
|
-
./store/index.ts
|
104
|
-
|
105
|
-
[tsl] ERROR in C:
|
117
|
+
[tsl] ERROR in C:Users\myProjec\store\index.ts(25,111)
|
106
118
|
|
107
119
|
TS2322: Type '0' is not assignable to type '{ label: number; sent: () => any; trys: never[]; ops: never[]; }'.
|
108
120
|
|
109
|
-
|
121
|
+
friendly-errors 11:49:13
|
110
122
|
|
111
|
-
|
123
|
+
ERROR in C:Users\myProjec\store\index.ts
|
112
124
|
|
113
|
-
[tsl] ERROR in C:
|
125
|
+
[tsl] ERROR in C:UsersmyProjec\store\index.ts(28,75)
|
114
126
|
|
115
127
|
TS2345: Argument of type 'any' is not assignable to parameter of type 'never'.
|
128
|
+
|
129
|
+
friendly-errors 11:49:13
|
116
130
|
|
117
131
|
```
|
118
132
|
|
1
「退会済ユーザ」となる不具合につき更新
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|