2023-06-27 16:23:18 +00:00
|
|
|
<script setup lang="ts">
|
2023-03-03 15:54:28 +00:00
|
|
|
import AsideMenuItem from '@/Components/AsideMenuItem.vue';
|
|
|
|
|
|
|
|
defineProps({
|
2023-03-17 15:13:37 +00:00
|
|
|
isDropdownList: Boolean,
|
|
|
|
menu: {
|
|
|
|
type: Object,
|
|
|
|
default: () => {},
|
|
|
|
},
|
|
|
|
});
|
2023-03-03 15:54:28 +00:00
|
|
|
|
2023-03-17 15:13:37 +00:00
|
|
|
const emit = defineEmits(['menu-click']);
|
2023-03-03 15:54:28 +00:00
|
|
|
|
|
|
|
const menuClick = (event, item) => {
|
2023-03-17 15:13:37 +00:00
|
|
|
emit('menu-click', event, item);
|
|
|
|
};
|
2023-03-03 15:54:28 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2023-03-17 15:13:37 +00:00
|
|
|
<ul>
|
|
|
|
<AsideMenuItem
|
|
|
|
v-for="(item, index) in menu"
|
|
|
|
:key="index"
|
|
|
|
v-bind:item="item"
|
2023-06-27 16:23:18 +00:00
|
|
|
:is-dropdown-list="item.children?.length > 0"
|
2023-03-17 15:13:37 +00:00
|
|
|
@menu-click="menuClick"
|
|
|
|
/>
|
|
|
|
</ul>
|
2023-03-03 15:54:28 +00:00
|
|
|
</template>
|