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

55 lines
1.2 KiB
Vue
Raw Permalink Normal View History

<script setup lang="ts">
2023-03-03 15:54:28 +00:00
import AsideMenuItem from '@/Components/AsideMenuItem.vue';
const props = defineProps({
// isDropdownList: Boolean,
menuItems: {
type: Array<Object>,
required: true,
2023-03-17 15:13:37 +00:00
},
// parentItem: {
// type: Object,
// required: false,
// },
2023-03-17 15:13:37 +00:00
});
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) => {
// emit('menu-click', event, item);
// };
2023-03-03 15:54:28 +00:00
</script>
<template>
<div class="aside-menu">
<ul>
<!-- <li class="menu-item"> -->
<!-- <AsideMenuItem
v-for="(menuItem, index) in props.items"
2023-03-17 15:13:37 +00:00
:key="index"
v-bind:item="menuItem"
@menu-click="menuClick"
/> -->
<AsideMenuItem v-for="(item, index) in props.menuItems" :key="index" :item="item"> </AsideMenuItem>
<!-- :is-dropdown-list="menuItem.children?.length > 0" -->
<!-- </li> -->
</ul>
</div>
2023-03-03 15:54:28 +00:00
</template>
<style>
/* .aside-menu {
position: fixed;
top: 0;
left: 0;
bottom: 0;
width: 200px;
background-color: #f5f5f5;
padding: 20px;
} */
.menu-item {
margin-bottom: 10px;
}
</style>