<template>
  <template v-for="item in menuInfo" :key="item.key">
    <a-sub-menu v-if="item.children" :key="item.key">
      <template #title>{{ item.name }}</template>
      <sub-menu :key="item.key" :menu-info="item.children" />
    </a-sub-menu>
    <a-menu-item v-else :key="item.key" @click="getAsset(item)">
      {{ item.name }}
    </a-menu-item>
  </template>
</template>
<script setup>
import { defineProps } from 'vue';
const props = defineProps({
  menuInfo: {
    type: Object,
    default: () => ({}),
  },
});

const getAsset = item => {
  console.log(item);
};
</script>

<style scoped>
</style>