forked from ElemeFE/element
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimage.d.ts
43 lines (29 loc) · 981 Bytes
/
image.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { VNode } from 'vue'
import { ElementUIComponent } from './component'
export type ObjectFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'
export interface ImageSlots {
/** Placeholder content when image hasn't loaded yet */
placeholder: VNode[]
/** Error content when error occurs to image load */
error: VNode[]
[key: string]: VNode[]
}
/** Image Component */
export declare class ElImage extends ElementUIComponent {
/** Image source */
src: string
/** Indicate how the image should be resized to fit its container, same as native 'object-fit' */
fit: ObjectFit
/** Whether to use lazy load */
lazy: boolean
/** Scroll container that to add scroll listener when using lazy load */
scrollContainer: string | HTMLElement
/** Native 'alt' attribute */
alt: string
/** Native 'referrerPolicy' attribute */
referrerPolicy: string
$slots: ImageSlots
previewSrcList: string[]
zIndex: number
initialIndex: number
}