Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: messy formatting #31

Merged
merged 2 commits into from
Jun 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/pocket/src/eq-ratio-img/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ group:
## API

| 属性 | 说明 | 类型 | 默认值 | 版本 |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ---------- | -------- | --- |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ---------- | -------- |
| src | 与`img`的事件相同 | `string` | - | |
| onLoad | 与`img`的事件相同 | `function` | - | |
| onError | 与`img`的事件相同 | `function` | - | |
| imgRef | 用于传递到组件中`img`元素的`ref` | `RefObject` | - | |
| stretch | 是否设置图片大小为容器尺寸?设置为`true`时,需要为组件显示地设置宽高。设置为`false`时,则和普通`img`的特性一致 | `boolean` | `true` | | |
| stretch | 是否设置图片大小为容器尺寸?设置为`true`时,需要为组件显示地设置宽高。设置为`false`时,则和普通`img`的特性一致 | `boolean` | `true` | |
| loadingSrc | 图片加载过程中的占位图/占位组件 | `ReactElement` / `string` | - | |
| errSrc | 图片加载失败的占位图/占位组件 | `ReactElement` / `string` | - | |
| mode | 缩放模式 <br/> `'normal'`: 普通缩放模式,图片会尽可能沾满宽度 <br/> `'scale'`: 拉伸模式,图片会变形填充满容器 <br/> `'cover'`: 覆盖模式,图片会等比缩放,覆盖满整个容器(可能会出现图片超界) <br/> `'contain'`: 包含模式,图片会等比缩放,但确保全部在容器内显示(可能无法铺满容器) | `'normal'` / `'scale'` / `'cover'` / `'contain'` | `'normal'` | |
Expand Down
Loading