mirror of
https://github.com/r-ca/kidshift-web.git
synced 2024-10-26 00:34:01 +00:00
test
This commit is contained in:
parent
d26592c25e
commit
ac55722f22
|
@ -19,22 +19,24 @@ import {
|
|||
* with the Store instance.
|
||||
*/
|
||||
|
||||
export interface StateInterface {
|
||||
// Define your own store structure, using submodules if needed
|
||||
// example: ExampleStateInterface;
|
||||
// Declared as unknown to avoid linting issue. Best to strongly type as per the line above.
|
||||
example: unknown
|
||||
export interface AccountStateInterface {
|
||||
account: {
|
||||
username: string
|
||||
token: string
|
||||
}
|
||||
isLogin: boolean
|
||||
taskList: any[]
|
||||
}
|
||||
|
||||
// provide typings for `this.$store`
|
||||
declare module '@vue/runtime-core' {
|
||||
interface ComponentCustomProperties {
|
||||
$store: VuexStore<StateInterface>
|
||||
$store: VuexStore<AccountStateInterface>
|
||||
}
|
||||
}
|
||||
|
||||
// provide typings for `useStore` helper
|
||||
export const storeKey: InjectionKey<VuexStore<StateInterface>> = Symbol('vuex-key')
|
||||
export const storeKey: InjectionKey<VuexStore<AccountStateInterface>> = Symbol('vuex-key')
|
||||
|
||||
// Provide typings for `this.$router` inside Vuex stores
|
||||
declare module "vuex" {
|
||||
|
@ -44,12 +46,8 @@ declare module "vuex" {
|
|||
}
|
||||
}
|
||||
|
||||
export default store(function (/* { ssrContext } */) {
|
||||
const Store = createStore<StateInterface>({
|
||||
modules: {
|
||||
// example
|
||||
},
|
||||
|
||||
export default store(function(/* { ssrContext } */) {
|
||||
const Store = createStore<AccountStateInterface>({
|
||||
// enable strict mode (adds overhead!)
|
||||
// for dev mode and --debug builds only
|
||||
strict: !!process.env.DEBUGGING
|
||||
|
|
Loading…
Reference in New Issue
Block a user