Refactor #4231 - For ContextMenu
parent
4e5038cffd
commit
b371f0e248
|
@ -75,6 +75,10 @@ export interface ContextMenuPassThroughOptions {
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
/**
|
||||||
|
* Used to control Vue Transition API.
|
||||||
|
*/
|
||||||
|
transition?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<Portal :appendTo="appendTo">
|
<Portal :appendTo="appendTo">
|
||||||
<transition name="p-contextmenu" @enter="onEnter" @after-enter="onAfterEnter" @leave="onLeave" @after-leave="onAfterLeave">
|
<transition name="p-contextmenu" @enter="onEnter" @after-enter="onAfterEnter" @leave="onLeave" @after-leave="onAfterLeave" v-bind="ptm('transition')">
|
||||||
<div v-if="visible" :ref="containerRef" :class="cx('root')" v-bind="{ ...$attrs, ...ptm('root') }" data-pc-name="contextmenu">
|
<div v-if="visible" :ref="containerRef" :class="cx('root')" v-bind="{ ...$attrs, ...ptm('root') }" data-pc-name="contextmenu">
|
||||||
<ContextMenuSub
|
<ContextMenuSub
|
||||||
:ref="listRef"
|
:ref="listRef"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<transition name="p-contextmenusub" @enter="onEnter">
|
<transition name="p-contextmenusub" @enter="onEnter" v-bind="ptm('menu.transition')">
|
||||||
<ul v-if="root ? true : visible" ref="container" :tabindex="tabindex" v-bind="ptm('menu')">
|
<ul v-if="root ? true : visible" ref="container" :tabindex="tabindex" v-bind="ptm('menu')">
|
||||||
<template v-for="(processedItem, index) of items" :key="getItemKey(processedItem)">
|
<template v-for="(processedItem, index) of items" :key="getItemKey(processedItem)">
|
||||||
<li
|
<li
|
||||||
|
|
Loading…
Reference in New Issue