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.
42 lines
970 B
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>
|
|
|