<script setup>
import MenuItem from './MenuItem.vue';
const props = defineProps({
  tree: Array,
  index: String || undefined,
})

// const emit = defineEmits(['update:index'])
// function handleSelect(index) {
//   emit('update:index', index)
// }

// console.log('props.index :>> ', props.index);
</script>

<template>
  <!-- @select="handleSelect" -->
  <el-menu class="menu" router :default-active="'/tree/' + index">
    <MenuItem v-for="item in tree" :item="item">
    </MenuItem>
  </el-menu>
</template>

<style lang="scss" scoped>
.menu {
  border-right: none;
}
</style>
