mirror of
https://github.com/aelve/guide.git
synced 2024-12-25 05:43:32 +03:00
da9031a6ba
* progress bar * Using saved scroll when going forward/back in browser * router intance added to context of client side asyncData functions
29 lines
553 B
TypeScript
29 lines
553 B
TypeScript
import Vuex from 'vuex'
|
|
import category from 'client/store/modules/category'
|
|
import categoryItem from 'client/store/modules/categoryItem'
|
|
import wiki from 'client/store/modules/wiki'
|
|
|
|
function createStore () {
|
|
// TODO loggins mutations in dev
|
|
return new Vuex.Store({
|
|
state: {
|
|
isPageLoading: false
|
|
},
|
|
actions: {},
|
|
mutations: {
|
|
tooglePageLoading (state) {
|
|
state.isPageLoading = !state.isPageLoading
|
|
}
|
|
},
|
|
modules: {
|
|
category,
|
|
categoryItem,
|
|
wiki
|
|
}
|
|
})
|
|
}
|
|
|
|
export {
|
|
createStore
|
|
}
|