1
2
3
4
5
6
7
8
9
10
11
12
13
| const getters = {
| // 因为index.js中没创建state,state是个对象默认存在的(为空)。在module中注册模块,state中就会有模块对象。
| // 通过箭头函数,调取值。
| sidebar: state => state.app.sidebar,
| device: state => state.app.device,
| token: state => state.user.token,
| avatar: state => state.user.avatar,
| name: state => state.user.name,
| regionCode: state => state.regionCode,
| progressList: state => state.downLoadProgress.progressList,
| progressError: state => state.downLoadProgress.progressError
| }
| export default getters
|
|