quanyawei
2024-11-15 f752f50a484f63fc3786ab1c7ad563f3b17cce77
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