jkchao / blog-admin

blog-admin @react、@typescript、@apollographql
https://admin.jkchao.cn
233 stars 52 forks source link

想请问下state文件夹里index.ts的StoreState表示的是什么意思 #7

Closed k-kaikai closed 6 years ago

jkchao commented 6 years ago

https://github.com/jkchao/vue-admin/blob/master/src/typings/store.d.ts#L1

我把 vuex modules 里的 state 都放到 typings 里了。 现在看来,当项目大了以后,还是没必要提出来。😂

k-kaikai commented 6 years ago

hahaha 没注意看 明白了 谢谢~

wwb568109135 commented 6 years ago

https://github.com/jkchao/vue-admin/blob/master/src/typings/store.d.ts#L1

我把 vuex modules 里的 state 都放到 typings 里了。 现在看来,当项目大了以后,还是没必要提出来。😂

你的意思是说,单独写每个vuex的state里面

jkchao commented 6 years ago

@wwb568109135 是的,写到每个 modules 里面,同时给 state 定义的 interface 需要 export 出去,需要给一些组件用。