18.03 Vuex - Create an Auth Store
This commit is contained in:
parent
bcfc3e0251
commit
6ec3e3ad11
@ -3,6 +3,7 @@ import Vuex from 'vuex'
|
|||||||
|
|
||||||
import tasks from './store-tasks'
|
import tasks from './store-tasks'
|
||||||
import settings from './store-settings'
|
import settings from './store-settings'
|
||||||
|
import auth from './store-auth'
|
||||||
|
|
||||||
Vue.use(Vuex)
|
Vue.use(Vuex)
|
||||||
|
|
||||||
@ -19,7 +20,8 @@ export default function (/* { ssrContext } */) {
|
|||||||
const Store = new Vuex.Store({
|
const Store = new Vuex.Store({
|
||||||
modules: {
|
modules: {
|
||||||
tasks,
|
tasks,
|
||||||
settings
|
settings,
|
||||||
|
auth
|
||||||
},
|
},
|
||||||
|
|
||||||
// enable strict mode (adds overhead!)
|
// enable strict mode (adds overhead!)
|
||||||
|
19
src/store/store-auth.js
Normal file
19
src/store/store-auth.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
const state = {
|
||||||
|
}
|
||||||
|
|
||||||
|
const mutations = {
|
||||||
|
}
|
||||||
|
|
||||||
|
const actions = {
|
||||||
|
}
|
||||||
|
|
||||||
|
const getters = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
namespaced: true,
|
||||||
|
state,
|
||||||
|
mutations,
|
||||||
|
actions,
|
||||||
|
getters
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user