tethys.backend/resources/js/Components/AsideMenuList.vue

30 lines
601 B
Vue
Raw Permalink Normal View History

<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"
: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>