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