pull/6423/head^2
tugcekucukoglu 2024-09-19 15:43:11 +03:00
parent d4c42aa393
commit ae32e74030
2 changed files with 8 additions and 4 deletions

View File

@ -8,6 +8,7 @@
<TieredMenuSub <TieredMenuSub
:ref="menubarRef" :ref="menubarRef"
:id="id + '_list'" :id="id + '_list'"
:class="cx('rootList')"
:tabindex="!disabled ? tabindex : -1" :tabindex="!disabled ? tabindex : -1"
role="menubar" role="menubar"
:aria-label="ariaLabel" :aria-label="ariaLabel"
@ -30,6 +31,7 @@
@item-click="onItemClick" @item-click="onItemClick"
@item-mouseenter="onItemMouseEnter" @item-mouseenter="onItemMouseEnter"
@item-mousemove="onItemMouseMove" @item-mousemove="onItemMouseMove"
v-bind="ptm('rootList')"
/> />
<div v-if="$slots.end" :class="cx('end')" v-bind="ptm('end')"> <div v-if="$slots.end" :class="cx('end')" v-bind="ptm('end')">
<slot name="end"></slot> <slot name="end"></slot>
@ -40,10 +42,10 @@
</template> </template>
<script> <script>
import { ConnectedOverlayScrollHandler, UniqueComponentId } from '@primevue/core/utils'; import { absolutePosition, addStyle, findSingle, focus, getOuterWidth, isTouchDevice } from '@primeuix/utils/dom';
import { focus, findSingle, addStyle, absolutePosition, getOuterWidth, isTouchDevice } from '@primeuix/utils/dom'; import { findLastIndex, isEmpty, isNotEmpty, isPrintableCharacter, resolve } from '@primeuix/utils/object';
import { isNotEmpty, resolve, isPrintableCharacter, isEmpty, findLastIndex } from '@primeuix/utils/object';
import { ZIndex } from '@primeuix/utils/zindex'; import { ZIndex } from '@primeuix/utils/zindex';
import { ConnectedOverlayScrollHandler, UniqueComponentId } from '@primevue/core/utils';
import OverlayEventBus from 'primevue/overlayeventbus'; import OverlayEventBus from 'primevue/overlayeventbus';
import Portal from 'primevue/portal'; import Portal from 'primevue/portal';
import BaseTieredMenu from './BaseTieredMenu.vue'; import BaseTieredMenu from './BaseTieredMenu.vue';

View File

@ -1,6 +1,6 @@
<template> <template>
<transition name="p-tieredmenu" @enter="onEnter" v-bind="ptm('menu.transition')"> <transition name="p-tieredmenu" @enter="onEnter" v-bind="ptm('menu.transition')">
<ul v-if="level === 0 ? true : visible" :ref="containerRef" :class="level === 0 ? cx('rootList') : cx('submenu')" :tabindex="tabindex" v-bind="level === 0 ? ptm('rootList') : ptm('submenu')"> <ul v-if="level === 0 ? true : visible" :ref="containerRef" :tabindex="tabindex">
<template v-for="(processedItem, index) of items" :key="getItemKey(processedItem)"> <template v-for="(processedItem, index) of items" :key="getItemKey(processedItem)">
<li <li
v-if="isItemVisible(processedItem) && !getItemProp(processedItem, 'separator')" v-if="isItemVisible(processedItem) && !getItemProp(processedItem, 'separator')"
@ -43,6 +43,7 @@
<TieredMenuSub <TieredMenuSub
v-if="isItemVisible(processedItem) && isItemGroup(processedItem)" v-if="isItemVisible(processedItem) && isItemGroup(processedItem)"
:id="getItemId(processedItem) + '_list'" :id="getItemId(processedItem) + '_list'"
:class="cx('submenu')"
:style="sx('submenu', true, { processedItem })" :style="sx('submenu', true, { processedItem })"
:aria-labelledby="getItemLabelId(processedItem)" :aria-labelledby="getItemLabelId(processedItem)"
role="menu" role="menu"
@ -58,6 +59,7 @@
@item-click="$emit('item-click', $event)" @item-click="$emit('item-click', $event)"
@item-mouseenter="$emit('item-mouseenter', $event)" @item-mouseenter="$emit('item-mouseenter', $event)"
@item-mousemove="$emit('item-mousemove', $event)" @item-mousemove="$emit('item-mousemove', $event)"
v-bind="ptm('submenu')"
/> />
</li> </li>
<li <li