diff --git a/examples/docs/en-US/image.md b/examples/docs/en-US/image.md index 6525db78f..3c8c5bd07 100644 --- a/examples/docs/en-US/image.md +++ b/examples/docs/en-US/image.md @@ -114,6 +114,7 @@ Besides the native features of img, support lazy load, custom placeholder and lo | src | Image source, same as native | string | — | - | | fit | Indicate how the image should be resized to fit its container, same as [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) | string | fill / contain / cover / none / scale-down | - | | alt | Native alt | string | - | - | +| referrer-policy | Native referrerPolicy | string | - | - | | lazy | Whether to use lazy load | boolean | — | false | | scroll-container | The container to add scroll listener when using lazy load | string / HTMLElement | — | The nearest parent container whose overflow property is auto or scroll | diff --git a/examples/docs/es/image.md b/examples/docs/es/image.md index d503325f7..db5165176 100644 --- a/examples/docs/es/image.md +++ b/examples/docs/es/image.md @@ -116,6 +116,7 @@ Además de las características nativas de img, soporte de carga perezosa, marca | src | origen de la imagen, igual que en nativo | string | — | - | | fit | Indica como la imagen debe adaptarse al contenendor, lo mismo que [object-fit](https://developer.mozilla.org/es/docs/Web/CSS/object-fit) | string | fill / contain / cover / none / scale-down | - | | alt | alt nativo | string | - | - | +| referrer-policy | referrerPolicy nativo | string | - | - | | lazy | si se usara lazy load | boolean | — | false | | scroll-container | El contenedor para añadir el scroll listener cuando se utiliza lazy load | string / HTMLElement | — | El contenedor padre más cercano cuya propiedad de desbordamiento es auto o scroll | diff --git a/examples/docs/fr-FR/image.md b/examples/docs/fr-FR/image.md index f5eaaf7b3..1167c88a6 100644 --- a/examples/docs/fr-FR/image.md +++ b/examples/docs/fr-FR/image.md @@ -115,6 +115,7 @@ En plus des propriétés natives de img, ce composant supporte le lazy loading, | src | Source de l'image, identique au natif. | string | — | - | | fit | Indique comment l'image devrait être redimmensionnée pour s'adapter à son conteneur, identique à [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) | string | fill / contain / cover / none / scale-down | - | | alt | Attribut alt natif.| string | - | - | +| referrer-policy | Attribut referrerPolicy natif.| string | - | - | | lazy | Si le lazy loading doit être utilisé. | boolean | — | false | | scroll-container | Le conteneur auquel ajouter le listener du scroll en mode lazy loading. | string / HTMLElement | — | Le conteneur parent le plus proche avec la propriété overflow à auto ou scroll. | diff --git a/examples/docs/zh-CN/image.md b/examples/docs/zh-CN/image.md index e611b996d..6a3f35b2a 100644 --- a/examples/docs/zh-CN/image.md +++ b/examples/docs/zh-CN/image.md @@ -114,6 +114,7 @@ | src | 图片源,同原生 | string | — | - | | fit | 确定图片如何适应容器框,同原生 [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) | string | fill / contain / cover / none / scale-down | - | | alt | 原生 alt | string | - | - | +| referrer-policy | 原生 referrerPolicy | string | - | - | | lazy | 是否开启懒加载 | boolean | — | false | | scroll-container | 开启懒加载后,监听 scroll 事件的容器 | string / HTMLElement | — | 最近一个 overflow 值为 auto 或 scroll 的父元素 | diff --git a/packages/image/src/main.vue b/packages/image/src/main.vue index 4cbccf0dc..c00c775b8 100644 --- a/packages/image/src/main.vue +++ b/packages/image/src/main.vue @@ -11,6 +11,7 @@ class="el-image__inner" :src="src" :alt="alt" + :referrerpolicy="referrerPolicy" :style="imageStyle" :class="{ 'el-image__inner--center': alignCenter }"> @@ -42,7 +43,8 @@ fit: String, lazy: Boolean, scrollContainer: {}, - alt: String + alt: String, + referrerPolicy: String }, data() { diff --git a/types/image.d.ts b/types/image.d.ts index 6cfa648e5..20d934c30 100644 --- a/types/image.d.ts +++ b/types/image.d.ts @@ -30,5 +30,8 @@ export declare class ElImage extends ElementUIComponent { /** Native 'alt' attribute */ alt: string + /** Native 'referrerPolicy' attribute */ + referrerPolicy: string + $slots: ImageSlots }