提交 1dcc79cb 编写于 作者: P Phillip Johnsen

Couple of improvements to the Vuex frontend guide

Two nitpick improvements to the following:

* set `state.isAddingUser = false` when request resulted in an error,
  as it has finished after all
* be very explicit about vuex store being a local module to avoid confusion
  about a dependency named `store`
上级 825b2bda
......@@ -186,7 +186,7 @@ Remember that actions only describe that something happened, they don't describe
state.users.push(user);
},
[types.REQUEST_ADD_USER_ERROR](state, error) {
state.isAddingUser = true;
state.isAddingUser = false;
state.errorAddingUser = error;
},
};
......@@ -231,7 +231,7 @@ The store should be included in the main component of your application:
```javascript
// app.vue
import store from 'store'; // it will include the index.js file
import store from './store'; // it will include the index.js file
export default {
name: 'application',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册