mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
24 lines
430 B
JavaScript
24 lines
430 B
JavaScript
export default {
|
|
namespaced: true,
|
|
state: () => ({
|
|
count: 0
|
|
}),
|
|
mutations: {
|
|
increment(state) {
|
|
state.count++;
|
|
}
|
|
},
|
|
getters: {
|
|
doubleCount(state) {
|
|
return state.count * 2;
|
|
}
|
|
},
|
|
actions: {
|
|
asyncIncrement({ commit }) {
|
|
setTimeout(() => {
|
|
commit('increment');
|
|
}, 2000);
|
|
}
|
|
}
|
|
};
|