diff --git a/packages/Image/preview.tsx b/packages/Image/preview.tsx index 7298295..28c80b8 100644 --- a/packages/Image/preview.tsx +++ b/packages/Image/preview.tsx @@ -28,7 +28,7 @@ export default function Preview(props: PreviewProps): JSX.Element { scale: 1, rotate: 0, }) - }, 210) + }, 250) }; // console.log('previewList', previewList) // 左旋转 @@ -117,7 +117,9 @@ export default function Preview(props: PreviewProps): JSX.Element { setIndex((index as number) + 1) } React.useEffect(() => { - setIndex(locateIndex) + if (show) { + setIndex(locateIndex) + } }, [show]) return ( diff --git a/packages/Image/style.scss b/packages/Image/style.scss index 191ee0e..33edcf9 100644 --- a/packages/Image/style.scss +++ b/packages/Image/style.scss @@ -73,6 +73,10 @@ i { font-size: 18px; } + + &:hover { + background: rgba(0, 0, 0, 0.3); + } } .previous { @@ -90,6 +94,10 @@ i { color: rgba(255, 255, 255, .6); } + + &:hover { + background: rgba(0, 0, 0, 0); + } } .preview_inner_box { diff --git a/src/pages/packages/image.tsx b/src/pages/packages/image.tsx index 39e55fb..57bfa5a 100644 --- a/src/pages/packages/image.tsx +++ b/src/pages/packages/image.tsx @@ -1,6 +1,6 @@ /* @name:"Image 图片" - @group:"通用" + @group:"数据" */ import React from 'react'; import Title from '../../components/title';