Skip to content

Commit 2827d83

Browse files
committed
Image: add referrerPolicy prop
1 parent b240f0e commit 2827d83

File tree

6 files changed

+10
-1
lines changed

6 files changed

+10
-1
lines changed

examples/docs/en-US/image.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ Besides the native features of img, support lazy load, custom placeholder and lo
114114
| src | Image source, same as native | string || - |
115115
| 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) | fill / contain / cover / none / scale-down || - |
116116
| alt | Native alt | string | - | - |
117+
| referrer-policy | Native referrerPolicy | string | - | - |
117118
| lazy | Whether to use lazy load | boolean || false |
118119
| 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 |
119120

examples/docs/es/image.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ Además de las características nativas de img, soporte de carga perezosa, marca
116116
| src | origen de la imagen, igual que en nativo | string || - |
117117
| fit | Indica como la imagen debe adaptarse al contenendor, lo mismo que [object-fit](https://developer.mozilla.org/es/docs/Web/CSS/object-fit) | fill / contain / cover / none / scale-down || - |
118118
| alt | alt nativo | string | - | - |
119+
| referrer-policy | referrerPolicy nativo | string | - | - |
119120
| lazy | si se usara lazy load | boolean || false |
120121
| 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 |
121122

examples/docs/fr-FR/image.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ En plus des propriétés natives de img, ce composant supporte le lazy loading,
115115
| src | Source de l'image, identique au natif. | string || - |
116116
| 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) | fill / contain / cover / none / scale-down || - |
117117
| alt | Attribut alt natif.| string | - | - |
118+
| referrer-policy | Attribut referrerPolicy natif.| string | - | - |
118119
| lazy | Si le lazy loading doit être utilisé. | boolean || false |
119120
| 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. |
120121

examples/docs/zh-CN/image.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
| src | 图片源,同原生 | string || - |
115115
| fit | 确定图片如何适应容器框,同原生 [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) | fill / contain / cover / none / scale-down || - |
116116
| alt | 原生 alt | string | - | - |
117+
| referrer-policy | 原生 referrerPolicy | string | - | - |
117118
| lazy | 是否开启懒加载 | boolean || false |
118119
| scroll-container | 开启懒加载后,监听 scroll 事件的容器 | string / HTMLElement || 最近一个 overflow 值为 auto 或 scroll 的父元素 |
119120

packages/image/src/main.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
class="el-image__inner"
1212
:src="src"
1313
:alt="alt"
14+
:referrerpolicy="referrerPolicy"
1415
:style="imageStyle"
1516
:class="{ 'el-image__inner--center': alignCenter }">
1617
</div>
@@ -42,7 +43,8 @@
4243
fit: String,
4344
lazy: Boolean,
4445
scrollContainer: {},
45-
alt: String
46+
alt: String,
47+
referrerPolicy: String
4648
},
4749
4850
data() {

types/image.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@ export declare class ElImage extends ElementUIComponent {
3030
/** Native 'alt' attribute */
3131
alt: string
3232

33+
/** Native 'referrerPolicy' attribute */
34+
referrerPolicy: string
35+
3336
$slots: ImageSlots
3437
}

0 commit comments

Comments
 (0)