mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-02 07:39:36 +08:00
d44f404eae
* chore: improve sort api table scripts
* sort api
* add ignore
* Revert "sort api"
This reverts commit 343505d5f0
.
* sort api
* Update package.json
* sort api
* Delete sort-api.js
* sort api
* sort api
* sort api
* fix
* Update index.zh-CN.md
* fix input-number
* fix input-number
* sort func
* fix
* Method moved to the end
* carousel method
38 lines
1.1 KiB
Markdown
38 lines
1.1 KiB
Markdown
---
|
|
category: Components
|
|
type: Data Display
|
|
title: Image
|
|
cols: 2
|
|
cover: 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 | - | 4.6.0 |
|
|
| fallback | Load failure fault-tolerant src | string | - | 4.6.0 |
|
|
| height | Image height | string \| number | - | 4.6.0 |
|
|
| placeholder | Load placeholder, use default placeholder when set `true` | ReactNode | - | 4.6.0 |
|
|
| preview | preview config, disabled when `false` | boolean \| [previewType](#previewType) | true | 4.6.0 [previewType](#previewType):4.7.0 |
|
|
| src | Image path | string | - | 4.6.0 |
|
|
| width | Image width | string \| number | - | 4.6.0 |
|
|
|
|
### previewType
|
|
|
|
```js
|
|
{
|
|
visible?: boolean;
|
|
onVisibleChange?: (visible, prevVisible) => void;
|
|
}
|
|
```
|
|
|
|
Other attributes [<img>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#Attributes)
|