mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-27 03:00:25 +08:00
26 lines
335 B
JavaScript
26 lines
335 B
JavaScript
const state = {
|
|
main: 0
|
|
}
|
|
|
|
const mutations = {
|
|
DECREMENT_MAIN_COUNTER (state) {
|
|
state.main--
|
|
},
|
|
INCREMENT_MAIN_COUNTER (state) {
|
|
state.main++
|
|
}
|
|
}
|
|
|
|
const actions = {
|
|
someAsyncTask ({ commit }) {
|
|
// do something async
|
|
commit('INCREMENT_MAIN_COUNTER')
|
|
}
|
|
}
|
|
|
|
export default {
|
|
state,
|
|
mutations,
|
|
actions
|
|
}
|