diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2018-03-01 23:50:00 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2018-03-01 23:50:00 +0000 |
commit | 3de58a246dfcc46dbccb2eabe02e8a8241ba5080 (patch) | |
tree | 367c87c394faadd0e465048a84ca236c3627436f /doc/development/fe_guide | |
parent | faade54a71435c9a6337251df01d7b40e75fa22f (diff) | |
parent | 59de0443edba21a2110f783a4b2595bc02e7db0f (diff) | |
download | gitlab-ce-refactor-protected-branches.tar.gz |
Merge branch 'master' into 'refactor-protected-branches'refactor-protected-branches
# Conflicts:
# config/webpack.config.js
Diffstat (limited to 'doc/development/fe_guide')
-rw-r--r-- | doc/development/fe_guide/vue.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/development/fe_guide/vue.md b/doc/development/fe_guide/vue.md index 09957feee17..093a3ca4407 100644 --- a/doc/development/fe_guide/vue.md +++ b/doc/development/fe_guide/vue.md @@ -508,7 +508,7 @@ import Vue from 'vue'; import Vuex from 'vuex'; import * as actions from './actions'; import * as getters from './getters'; -import * as mutations from './mutations'; +import mutations from './mutations'; Vue.use(Vuex); @@ -527,7 +527,7 @@ _Note:_ If the state of the application is too complex, an individual file for t An action commits a mutatation. In this file, we will write the actions that will call the respective mutation: ```javascript - import * as types from './mutation-types' + import * as types from './mutation_types'; export const addUser = ({ commit }, user) => { commit(types.ADD_USER, user); @@ -577,7 +577,8 @@ import { mapGetters } from 'vuex'; The only way to actually change state in a Vuex store is by committing a mutation. ```javascript - import * as types from './mutation-types' + import * as types from './mutation_types'; + export default { [types.ADD_USER](state, user) { state.users.push(user); @@ -686,4 +687,3 @@ describe('component', () => { [vuex-testing]: https://vuex.vuejs.org/en/testing.html [axios]: https://github.com/axios/axios [axios-interceptors]: https://github.com/axios/axios#interceptors - |