Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ningstyle committed Jan 13, 2023
1 parent d936519 commit d98275a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/Image/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function Preview(props: PreviewProps): JSX.Element {
scale: 1,
rotate: 0,
})
}, 210)
}, 250)
};
// console.log('previewList', previewList)
// 左旋转
Expand Down Expand Up @@ -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 (
<Mask visible={show as boolean} maskClick={handlerClose}>
Expand Down
8 changes: 8 additions & 0 deletions packages/Image/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
i {
font-size: 18px;
}

&:hover {
background: rgba(0, 0, 0, 0.3);
}
}

.previous {
Expand All @@ -90,6 +94,10 @@
i {
color: rgba(255, 255, 255, .6);
}

&:hover {
background: rgba(0, 0, 0, 0);
}
}

.preview_inner_box {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/packages/image.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
@name:"Image 图片"
@group:"通用"
@group:"数据"
*/
import React from 'react';
import Title from '../../components/title';
Expand Down

0 comments on commit d98275a

Please sign in to comment.