docs: show image delay load

This commit is contained in:
unix
2020-04-06 14:52:19 +08:00
parent 9fdd75166d
commit 517212839f
2 changed files with 6 additions and 2 deletions

View File

@@ -22,7 +22,8 @@ Display image content.
desc="`Image` will show skeleton animation after `width` and `height` props are set."
scope={{ Image }}
code={`
<Image width="540" height="160" src="/images/custom-domains.png" />
<Image width="540" height="160"
src="http://www.deelay.me/2000/https://react.zeit-ui.co/images/custom-domains.png" />
`} />
<Playground
@@ -42,6 +43,7 @@ Display image content.
| ---------- | ---------- | ---- | -------------- | ------ |
| **src** | image src | `string` | - | - |
| **animation** | display animation when loading | `boolean` | - | `true` |
| **maxDelay**(ms) | max duration of animation | `number` | - | `3000` |
| **width** | width | `number` | - | - |
| **height** | height | `number` | - | - |
| **scale** | scale value | `string` | - | `100%` |

View File

@@ -21,7 +21,8 @@ export const meta = {
desc="组件在设置 `width` 与 `height` 属性后会在加载时显示骨架动画。"
scope={{ Image }}
code={`
<Image width="540" height="160" src="/images/custom-domains.png" />
<Image width="540" height="160"
src="http://www.deelay.me/2000/https://react.zeit-ui.co/images/custom-domains.png" />
`} />
<Playground
@@ -41,6 +42,7 @@ export const meta = {
| ---------- | ---------- | ---- | -------------- | ------ |
| **src** | 图片地址 | `string` | - | - |
| **animation** | 是否在加载时显示骨架动画 | `boolean` | - | `true` |
| **maxDelay** | 动画持续最大时间 (毫秒) | `number` | - | `3000` |
| **width** | 宽度 | `number` | - | - |
| **height** | 高度 | `number` | - | - |
| **scale** | 缩放比例 | `string` | - | `100%` |