Refactor #4274 - For Image
parent
c4b7221efb
commit
07dae2e611
|
@ -232,7 +232,7 @@ export interface ImageSlots {
|
|||
/**
|
||||
* Image error function.
|
||||
*/
|
||||
onError: void;
|
||||
onError(): void;
|
||||
}): VNode[];
|
||||
/**
|
||||
* Custom preview template.
|
||||
|
@ -249,7 +249,7 @@ export interface ImageSlots {
|
|||
/**
|
||||
* Preview click function.
|
||||
*/
|
||||
onClick: void;
|
||||
onClick(): void;
|
||||
}): VNode[];
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
</div>
|
||||
<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">
|
||||
<slot name="preview" :class="cx('preview')" :style="imagePreviewStyle" :onClick="onPreviewImageClick">
|
||||
<img :src="$attrs.src" :class="cx('preview')" :style="imagePreviewStyle" @click="onPreviewImageClick" v-bind="ptm('preview')" />
|
||||
</slot>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue