| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <template>
- <SideBarItem :menuList="menuList" />
- </template>
- <script>
- import SideBarItem from "./SideBarItem.vue";
- import { mapGetters } from "vuex";
- export default {
- components: {
- SideBarItem,
- },
- computed: {
- ...mapGetters("user", ["userInfoLogin"]),
- },
- data() {
- return {
- activeMenuName: "/targetImprove",
- menuList: [
- {
- icon: "icon_baxiangzizhulianxi",
- externalLink: "/targetImprove/pracice",
- menuName: "靶向自主练习",
- },
- {
- icon: "icon_baxiangcuotifupan",
- 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>
|