Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { mapState, mapActions } from 'vuex'
- export default {
- computed: {
- ...mapState({
- user: state => state.user
- })
- },
- methods: {
- loginAction: function() {
- const self = this;
- // Set new user into storage
- self.userLogged({ name: "User", id: "#1" });
- },
- ...mapActions(['userLogged'])
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement