Nuxt/examples/middleware/store/index.js
2017-10-31 21:43:55 +08:00

13 lines
182 B
JavaScript

export const state = () => ({
visits: []
})
export const mutations = {
ADD_VISIT(state, path) {
state.visits.push({
path,
date: new Date().toJSON()
})
}
}