Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. computed: {
  2. ...mapState({
  3. user: 'user.data',
  4. castingSpell: 'spellOptions.castingSpell',
  5. isRunningYesterdailies: 'isRunningYesterdailies',
  6. }),
  7. }
  8.  
  9. export function mapState (states) {
  10. const res = {};
  11.  
  12. normalizeMap(states).forEach(({ key, val }) => {
  13. res[key] = function mappedState () {
  14. return typeof val === 'function' ?
  15. val.call(this, this.$store.state, this.$store.getters) :
  16. get(this.$store.state, val);
  17. };
  18. });
  19.  
  20. return res;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement