mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
docs: add Image Preview doc (#26915)
This commit is contained in:
parent
46bbad77c4
commit
20f04e428f
@ -21,8 +21,17 @@ Previewable image.
|
||||
| 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 | Whether to enable the preview | boolean | true | 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
|
||||
|
||||
```
|
||||
{
|
||||
visible: boolean,
|
||||
onVisibleChange:function(value, prevValue)
|
||||
}
|
||||
```
|
||||
|
||||
Other attributes [<img\>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#Attributes)
|
||||
|
@ -16,14 +16,23 @@ cover: https://gw.alipayobjects.com/zos/antfincdn/D1dXz9PZqa/image.svg
|
||||
|
||||
## API
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| ----------- | ---------------------------------- | ---------------- | ------ | ----- |
|
||||
| alt | 图像描述 | string | - | 4.6.0 |
|
||||
| fallback | 加载失败容错地址 | string | - | 4.6.0 |
|
||||
| height | 图像高度 | string \| number | - | 4.6.0 |
|
||||
| placeholder | 加载占位, 为 `true` 时使用默认占位 | ReactNode | - | 4.6.0 |
|
||||
| preview | 是否开启预览 | boolean | true | 4.6.0 |
|
||||
| src | 图片地址 | string | - | 4.6.0 |
|
||||
| width | 图像宽度 | string \| number | - | 4.6.0 |
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| alt | 图像描述 | string | - | 4.6.0 |
|
||||
| fallback | 加载失败容错地址 | string | - | 4.6.0 |
|
||||
| height | 图像高度 | string \| number | - | 4.6.0 |
|
||||
| placeholder | 加载占位, 为 `true` 时使用默认占位 | ReactNode | - | 4.6.0 |
|
||||
| preview | 预览参数,为 `false` 时禁用 | boolean \| \| [previewType](#previewType) | true | 4.6.0 [previewType](#previewType):4.7.0 |
|
||||
| src | 图片地址 | string | - | 4.6.0 |
|
||||
| width | 图像宽度 | string \| number | - | 4.6.0 |
|
||||
|
||||
### previewType
|
||||
|
||||
```
|
||||
{
|
||||
visible: boolean,
|
||||
onVisibleChange:function(value, prevValue)
|
||||
}
|
||||
```
|
||||
|
||||
其他属性见 [<img\>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#Attributes)
|
||||
|
@ -125,7 +125,7 @@
|
||||
"rc-drawer": "~4.1.0",
|
||||
"rc-dropdown": "~3.2.0",
|
||||
"rc-field-form": "~1.12.0",
|
||||
"rc-image": "~3.0.6",
|
||||
"rc-image": "~3.2.1",
|
||||
"rc-input-number": "~6.0.0",
|
||||
"rc-mentions": "~1.5.0",
|
||||
"rc-menu": "~8.7.1",
|
||||
|
Loading…
Reference in New Issue
Block a user