Home.js 281 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * @summary 首页
  3. * @date 2020/08/19
  4. */
  5. export const state = () => ({
  6. counter: 0
  7. })
  8. export const getters = {
  9. getCounter(state) {
  10. return state.counter
  11. }
  12. }
  13. export const mutations = {
  14. increment(state, payload) {
  15. state.counter += payload;
  16. }
  17. }