import {defineStore} from "pinia";
import router from "../router";
export const useRootStore = defineStore('root',{
    state() {
        return {
            userInfo:{},
            leftMenuList:[],
            isManager:false,
            defaultActive:"",
            toHomeCounter:0,
        }
    },
    actions:{
        async userMenu() {
            const userInfo = localStorage.getItem('dataWatchLoginUserInfo')
            if (userInfo){
                this.userInfo = JSON.parse(userInfo)
            }
        },
    }
})