Refactor #4231 - For OverlayPanel

pull/4239/head
mertsincan 2023-08-02 15:01:58 +03:00
parent b039254340
commit 29e3ba3978
2 changed files with 5 additions and 1 deletions

View File

@ -48,6 +48,10 @@ export interface OverlayPanelPassThroughOptions {
* @see {@link BaseComponent.ComponentHooks} * @see {@link BaseComponent.ComponentHooks}
*/ */
hooks?: ComponentHooks; hooks?: ComponentHooks;
/**
* Used to control Vue Transition API.
*/
transition?: any;
} }
/** /**

View File

@ -1,6 +1,6 @@
<template> <template>
<Portal :appendTo="appendTo"> <Portal :appendTo="appendTo">
<transition name="p-overlaypanel" @enter="onEnter" @leave="onLeave" @after-leave="onAfterLeave"> <transition name="p-overlaypanel" @enter="onEnter" @leave="onLeave" @after-leave="onAfterLeave" v-bind="ptm('transition')">
<div v-if="visible" :ref="containerRef" v-focustrap role="dialog" :aria-modal="visible" @click="onOverlayClick" :class="cx('root')" v-bind="{ ...$attrs, ...ptm('root') }"> <div v-if="visible" :ref="containerRef" v-focustrap role="dialog" :aria-modal="visible" @click="onOverlayClick" :class="cx('root')" v-bind="{ ...$attrs, ...ptm('root') }">
<div :class="cx('content')" @click="onContentClick" @mousedown="onContentClick" @keydown="onContentKeydown" v-bind="ptm('content')"> <div :class="cx('content')" @click="onContentClick" @mousedown="onContentClick" @keydown="onContentKeydown" v-bind="ptm('content')">
<slot></slot> <slot></slot>