Aside.vue 661 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <el-menu
  3. :default-active="this.$store.state.currentMenuItem"
  4. style="width: 220px; height: 100%"
  5. background-color="#141B29"
  6. text-color="#fff"
  7. active-text-color="#ffd04b"
  8. :router="true"
  9. >
  10. <el-sub-menu
  11. v-for="(item, index) in this.$store.state.menuData"
  12. :key="item"
  13. :index="`${index}`"
  14. >
  15. <template v-slot:title>
  16. <i :class="item.icon"></i>
  17. <span>{{ item.title }}</span>
  18. </template>
  19. <el-menu-item v-for="son in item.items" :index="son.path" :key="son">
  20. {{ son.name }}
  21. </el-menu-item>
  22. </el-sub-menu>
  23. </el-menu>
  24. </template>
  25. <script setup>
  26. </script>