diff --git a/api-generator/components/image.js b/api-generator/components/image.js
index d5966f3a6..b769fc84f 100644
--- a/api-generator/components/image.js
+++ b/api-generator/components/image.js
@@ -52,6 +52,10 @@ const ImageSlots = [
{
name: 'close',
description: 'Custom content for the component close.'
+ },
+ {
+ name: 'imagePreview',
+ description: 'Custom content for the component preview.'
}
];
diff --git a/components/lib/image/Image.d.ts b/components/lib/image/Image.d.ts
index b20a3e0b5..af5a5e7d9 100644
--- a/components/lib/image/Image.d.ts
+++ b/components/lib/image/Image.d.ts
@@ -62,6 +62,10 @@ export interface ImageSlots {
* Custom close template.
*/
close(): VNode[];
+ /**
+ * Custom preview template.
+ */
+ imagePreview(): VNode[];
}
export interface ImageEmits {}
diff --git a/components/lib/image/Image.vue b/components/lib/image/Image.vue
index a5562d497..3745b4324 100644
--- a/components/lib/image/Image.vue
+++ b/components/lib/image/Image.vue
@@ -41,7 +41,9 @@
+
+
Enabling preview mode displays a modal layer when the image is clicked to provide transformation options such as rotating and zooming.