Refactor #4231 - For Image

pull/4239/head
mertsincan 2023-08-02 15:01:11 +03:00
parent dea8190c64
commit 4488b0082a
2 changed files with 5 additions and 1 deletions

View File

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

View File

@ -41,7 +41,7 @@
</slot>
</button>
</div>
<transition name="p-image-preview" @before-enter="onBeforeEnter" @enter="onEnter" @leave="onLeave" @before-leave="onBeforeLeave" @after-leave="onAfterLeave">
<transition name="p-image-preview" @before-enter="onBeforeEnter" @enter="onEnter" @leave="onLeave" @before-leave="onBeforeLeave" @after-leave="onAfterLeave" v-bind="ptm('transition')">
<div v-if="previewVisible" v-bind="ptm('previewContainer')">
<slot name="preview" :style="imagePreviewStyle" :onClick="onPreviewImageClick">
<img :src="$attrs.src" :class="cx('preview')" :style="imagePreviewStyle" @click="onPreviewImageClick" v-bind="ptm('preview')" />