Advertisement
Guest User

Untitled

a guest
Apr 1st, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { mapState, mapActions } from 'vuex'
  2.  
  3. export default {
  4.     computed: {
  5.         ...mapState({
  6.             user: state => state.user
  7.         })
  8.     },
  9.     methods: {
  10.         loginAction: function() {
  11.             const self = this;
  12.             // Set new user into storage
  13.             self.userLogged({ name: "User", id: "#1" });
  14.         },
  15.         ...mapActions(['userLogged'])
  16.     }
  17. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement