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
|
2023-11-27 16:17:22 +00:00
|
|
|
v-for="(menuItem, index) in menu"
|
2023-03-17 15:13:37 +00:00
|
|
|
:key="index"
|
2023-11-27 16:17:22 +00:00
|
|
|
v-bind:item="menuItem"
|
|
|
|
:is-dropdown-list="menuItem.children?.length > 0"
|
2023-03-17 15:13:37 +00:00
|
|
|
@menu-click="menuClick"
|
|
|
|
/>
|
|
|
|
</ul>
|
2023-03-03 15:54:28 +00:00
|
|
|
</template>
|