Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/assets/vue/components/basecomponents/BaseSidebarPanelMenu.vue

42 lines
970 B

<script setup>
import PanelMenu from "primevue/panelmenu"
import BaseIcon from "./BaseIcon.vue"
defineModel({
type: Array,
required: true,
})
</script>
<template>
<PanelMenu :model="modelValue">
<template #item="{ item, root, active, props }">
<BaseAppLink
v-if="item.route || item.url"
:class="{ 'p-panelmenu-header-action': root, 'p-menuitem-link': !root }"
:to="item.route"
:url="item.url"
>
<span v-bind="props.icon" />
<span
v-bind="props.label"
v-text="item.label"
/>
</BaseAppLink>
<a
v-else-if="root"
class="p-panelmenu-header-action"
>
<span v-bind="props.icon" />
<span
v-bind="props.label"
v-text="item.label"
/>
<BaseIcon
:icon="active ? 'fold' : 'unfold'"
class="p-icon p-submenu-icon"
/>
</a>
</template>
</PanelMenu>
</template>