12345678910111213141516171819202122 |
- import {
- mapState
- } from 'vuex';
- export default {
- computed:{
- ...mapState({
- user:(state)=> state.user.user,
- isLogin:(state)=> !!state.user.user.token
- }),
- },
- methods:{
- updateUserInfo(user){
- this.$store.commit('setUserInfo',{
- ...this.user,
- ...user
- });
- }
- }
- }
|