<template>
  <SideBarItem :menuList="menuList" />
</template>
<script>
import SideBarItem from "@/components/SideBarItem.vue";
import { mapGetters } from "vuex";
export default {
  components: {
    SideBarItem,
  },
  computed: {
    ...mapGetters("user", ["userInfoLogin"]),
  },
  data() {
    return {
      activeMenuName: "/targetImprove",
      menuList: [
        {
          icon: "icon_nianjihuaxiang",
          externalLink: "/targetImprove/pracice",
          menuName: "自主练习",
        },
        {
          icon: "icon_zhidianbuqiang",
          externalLink: "/targetImprove/consolidate",
          menuName: "错题巩固",
        },
      ],
      allMenuList:[],//总菜单
    };
  },
  watch: {
    userInfo: {
      handler(newValue, oldValue) {
        console.log(newValue, oldValue);

      },
      deep: true, // 监听对象的深层变化
    },
  },
  created() {
    console.log("打印个人中心菜单this.userInfo",this.userInfo);
  },
  mounted() {






    // this.activeMenu();
  },
  methods: {
    // activeMenu() {
    //   const route = this.$route;
    //   const { path } = route;
    //   if (path == "/userInfo") {
    //     this.activeMenuName = "/userInfo/personInfo";
    //   }
    // },
  },
};
</script>
<style lang="scss" scoped></style>
