diff --git a/components/image/index.zh-CN.md b/components/image/index.zh-CN.md index c5324fccb5..d17b107408 100644 --- a/components/image/index.zh-CN.md +++ b/components/image/index.zh-CN.md @@ -47,17 +47,17 @@ coverDark: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*LVQ3R5JjjJEAAA ```typescript { visible?: boolean; - onVisibleChange?: (visible, prevVisible, current: number) => void; // current 参数v5.3.0后支持 + onVisibleChange?: (visible, prevVisible, current: number) => void; // current 参数 v5.3.0 后支持 getContainer?: string | HTMLElement | (() => HTMLElement); // v4.8.0 src?: string; // v4.10.0 mask?: ReactNode; // v4.9.0 maskClassName?: string; // v4.11.0 - rootClassName?: string; // v5.4.0后支持 + rootClassName?: string; // v5.4.0 后支持 current?: number; // v4.12.0 仅支持 PreviewGroup countRender?: (current: number, total: number) => string // v4.20.0 仅支持 PreviewGroup scaleStep?: number; forceRender?: boolean; - onChange?: (current: number, prevCurrent: number) => void; // v5.3.0后支持 + onChange?: (current: number, prevCurrent: number) => void; // v5.3.0 后支持 } ``` diff --git a/components/image/style/index.ts b/components/image/style/index.ts index 3a290eb0f4..3d26de0fe5 100644 --- a/components/image/style/index.ts +++ b/components/image/style/index.ts @@ -1,10 +1,10 @@ import type { CSSObject } from '@ant-design/cssinjs'; import { TinyColor } from '@ctrl/tinycolor'; import { genModalMaskStyle } from '../../modal/style'; -import { initZoomMotion, initFadeMotion } from '../../style/motion'; +import { resetComponent, textEllipsis } from '../../style'; +import { initFadeMotion, initZoomMotion } from '../../style/motion'; import type { FullToken, GenerateStyle } from '../../theme/internal'; import { genComponentStyleHook, mergeToken } from '../../theme/internal'; -import { resetComponent, textEllipsis } from '../../style'; export interface ComponentToken { zIndexPopup: number; @@ -81,6 +81,7 @@ export const genPreviewOperationsStyle = (token: ImageToken): CSSObject => { padding: paddingSM, cursor: 'pointer', transition: `all ${motionDurationSlow}`, + userSelect: 'none', '&:hover': { background: operationBgHover.toRgbString(), @@ -140,6 +141,7 @@ export const genPreviewSwitchStyle = (token: ImageToken): CSSObject => { cursor: 'pointer', transition: `all ${motionDurationSlow}`, pointerEvents: 'auto', + userSelect: 'none', '&:hover': { background: operationBgHover.toRgbString(),