Skip to content

Commit

Permalink
docs: ImagePreview add previewCls & previewStyle API description, Ima…
Browse files Browse the repository at this point in the history
…ge add onClick API description
  • Loading branch information
YyumeiZhang committed Jan 8, 2024
1 parent 11245f5 commit c8a2f88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions content/show/image/index-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ import { Image, ImagePreview } from '@douyinfe/semi-ui';
| crossOrigin | Passthrough to the crossorigin of the native img tag | 'anonymous' \| 'use-credentials' |-| |
| fallback | Custom loading failed display content | ReactNode | - | |
| height | Image display height | number | - | |
| onClick | Click callback on image | (event: Event) => void | - | |
| onError | Load error callback | (event: Event) => void | - | |
| onLoad | Load success callback | (event: Event) => void | - | |
| placeholder | Placeholder content when the image is not loaded | ReactNode | - | |
Expand Down Expand Up @@ -511,6 +512,8 @@ import { Image, ImagePreview } from '@douyinfe/semi-ui';
| preLoad | Whether to enable preloading | boolean | true | |
| preLoadGap | Preloaded step size | number | 2 | |
| previewTitle | Custom preview title | ReactNode | - | |
| previewCls | Custom preview style class name | string | - | |
| previewStyle | Custom preview style | object | - | |
| prevTip | Previous operation button prompt | string | "Previous" | |
| renderHeader | Custom render preview top info |(info: reactNode) => ReactNode | - | |
| renderPreviewMenu | Custom render preview bottom menu information | (props: MenuProps) => ReactNode; | - | |
Expand Down
3 changes: 3 additions & 0 deletions content/show/image/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ import { Image, ImagePreview } from '@douyinfe/semi-ui';
| crossOrigin | 透传给原生 img 标签的 crossorigin | 'anonymous'|'use-credentials'| - | |
| fallback | 加载失败容错地址或者自定义加载失败时的显示内容 | ReactNode | - | |
| height | 图片显示高度 | number | - | |
| onClick | 点击图片的回调 | (event: any) => void | - | |
| onError | 加载错误回调 | (event: Event) => void | - | |
| onLoad | 加载成功回调 | (event: Event) => void | - | |
| placeholder | 图片未加载时候的占位内容 | ReactNode | - | |
Expand Down Expand Up @@ -513,6 +514,8 @@ import { Image, ImagePreview } from '@douyinfe/semi-ui';
| preLoad | 是否开启预加载 | boolean | true | |
| preLoadGap | 预加载的步长 | number | 2 | |
| previewTitle | 自定义预览 title | ReactNode | - | |
| previewCls | 自定义预览样式类名 | string | - | |
| previewStyle | 自定义预览样式 | object | - | |
| prevTip | 上一步操作按钮提示 | string | "上一步" | |
| renderHeader | 自定义渲染预览顶部信息 | (info: ReactNode) => ReactNode | - | |
| renderPreviewMenu | 自定义渲染预览底部菜单信息 | (props: MenuProps) => ReactNode;| - | |
Expand Down

0 comments on commit c8a2f88

Please sign in to comment.