<template>
                 <div class="menu-li">
                    <div class="flex items-center px-2 pointer" @click="menuClick(item.id)" v-for="(item,index) in menuList" v-show="item.paths !='workbench'"> 
                        {{ item.name }}
                    </div>
                </div>
</template>

<script setup>
import {getUserInfoByID,getUserInfo} from "@/api/user"
import useUserStore from '@/stores/modules/user'
const userStore = useUserStore()



const menuList=reactive([])
getUserInfo().then(res=>{
res.menu.forEach(item => {
    menuList.push(item)
});

})
const menuClick=(id)=>{
    userStore.getUserInfoByID(id)



    // console.log(id)
}
   
</script>

<style lang="scss" scoped>

</style>