UNPKG

me-bootstrap

Version:
30 lines (23 loc) 377 B
import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const state = { count: 0 } const mutations = { increment (state) { state.count++ } } const actions = { increment: ({ commit }) => commit('increment') } const getters = { countPlural: ({ count }) => Math.min(count, 2) } export default new Vuex.Store({ state, mutations, actions, getters })