From c8a2f88f314b5fd4ed481ef9bde3b5c043d2077d Mon Sep 17 00:00:00 2001 From: "zhangyumei.0319" Date: Mon, 8 Jan 2024 15:30:47 +0800 Subject: [PATCH] docs: ImagePreview add previewCls & previewStyle API description, Image add onClick API description --- content/show/image/index-en-US.md | 3 +++ content/show/image/index.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/content/show/image/index-en-US.md b/content/show/image/index-en-US.md index 5250b5191f..3b512f7747 100644 --- a/content/show/image/index-en-US.md +++ b/content/show/image/index-en-US.md @@ -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 | - | | @@ -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; | - | | diff --git a/content/show/image/index.md b/content/show/image/index.md index 8419466287..282137015e 100644 --- a/content/show/image/index.md +++ b/content/show/image/index.md @@ -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 | - | | @@ -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;| - | |