Skip to content

Commit

Permalink
fix: 现在鼠标略过“关于”页面时,并不会立即显示,以免干扰其他操作
Browse files Browse the repository at this point in the history
  • Loading branch information
SSmJaE committed Mar 8, 2024
1 parent 6f78e01 commit ec487e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/views/Floating/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export function FloatingBall() {
disabled={isDragging}
placement={"top"}
offsetPixel={24}
// openDelay
>
<div
style={{
Expand Down
1 change: 1 addition & 0 deletions src/views/Log/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ export function LogPanel() {
<PopOver
key="about"
content={<About />}
openDelay
delay
backgroundColor="rgba(255, 255, 255, 0.95)"
placement="right"
Expand Down
4 changes: 3 additions & 1 deletion src/views/components/PopOver.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default function PopOver({
offsetPixel = 8,
backgroundColor = "rgba(104, 101, 101, 0.89)",
delay = false,
openDelay = false,
border = false,
}: {
children: React.ReactNode;
Expand All @@ -30,6 +31,7 @@ export default function PopOver({
offsetPixel?: number;
backgroundColor?: string;
delay?: boolean;
openDelay?: boolean;
border?: boolean;
}) {
const theme = useTheme();
Expand All @@ -53,7 +55,7 @@ export default function PopOver({

const hover = useHover(context, {
delay: {
// open: 200,
open: openDelay ? 500 : undefined,
close: delay ? 250 : undefined,
},
});
Expand Down

0 comments on commit ec487e2

Please sign in to comment.