Skip to content

Commit

Permalink
docs: add Image Preview doc (ant-design#26915)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaodahong authored Sep 28, 2020
1 parent 46bbad7 commit 20f04e4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 11 deletions.
11 changes: 10 additions & 1 deletion components/image/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
27 changes: 18 additions & 9 deletions components/image/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 20f04e4

Please sign in to comment.