|
@@ -24,8 +24,9 @@ const actions = {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async checkCache({ commit }) {
|
|
|
|
|
|
+ async checkCache({ rootState, commit, dispatch }) {
|
|
let res = commit('setDefOpt', null, { root: true });
|
|
let res = commit('setDefOpt', null, { root: true });
|
|
|
|
+ if (!rootState.defaultOption) dispatch('fetch');
|
|
console.log(res);
|
|
console.log(res);
|
|
},
|
|
},
|
|
async update({ commit }, { id, ...data }) {
|
|
async update({ commit }, { id, ...data }) {
|