import Vue from 'vue' import Vuex from 'vuex' import App from './App.vue' Vue.config.productionTip = false; Vue.use(Vuex); let store = new Vuex.Store({ state: { count: 1 }, mutations: { update: function(state){ state.count++; window.alert(state.count); } } }); new Vue({ store: store, render: h => h(App) }).$mount('#app')