SHARE
TWEET

Untitled

a guest Jun 16th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top