mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-02 03:58:05 +08:00
bd87079e12
* feat(image): add new features * fix: lint error * update test * update code * update docs * perf: reset currentIndex after close * update code * update code * update code * update code * update code * add rootClassName props * fix lint
1.3 KiB
1.3 KiB
category | type | title | cover |
---|---|---|---|
Components | Data Display | Image | https://gw.alipayobjects.com/zos/antfincdn/D1dXz9PZqa/image.svg |
Previewable image.
When To Use
- When you need to display pictures.
- Display when loading a large image or fault tolerant handling when loading fail.
API
Property | Description | Type | Default | Version |
---|---|---|---|---|
alt | Image description | string | - | 2.0.0 |
fallback | Load failure fault-tolerant src | string | - | 2.0.0 |
height | Image height | string | number | - | 2.0.0 |
placeholder | Load placeholder, use default placeholder when set true |
boolean | slot | - | 2.0.0 |
preview | preview config, disabled when false |
boolean | previewType | true | 2.0.0 |
src | Image path | string | - | 2.0.0 |
previewMask | custom mask | slot | - | 3.2.0 |
width | Image width | string | number | - | 2.0.0 |
onError | Load failed callback | (event: Event) => void | - | 3.2.0 |
previewType
{
visible?: boolean;
onVisibleChange?: (visible, prevVisible) => void;
getContainer?: string | HTMLElement | (() => HTMLElement);
src?: string;
maskClassName?: string;
current?: number;
}
Other attributes <img>