mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
cf24b926a1
- Add example /custom-routes/ - Rename example/with-store/ to examples/vuex-store/ - Feature: Add .vue at the end of the component if not specified in custom routes - Feature: Add .params and .query in the context - Feature: Add .name in route if given in custom routes
18 lines
220 B
JavaScript
18 lines
220 B
JavaScript
import Vue from 'vue'
|
|
import Vuex from 'vuex'
|
|
|
|
Vue.use(Vuex)
|
|
|
|
const store = new Vuex.Store({
|
|
state: {
|
|
counter: 0
|
|
},
|
|
mutations: {
|
|
increment (state) {
|
|
state.counter++
|
|
}
|
|
}
|
|
})
|
|
|
|
export default store
|