Skip to content

Commit

Permalink
优化 tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouhua committed Jan 23, 2025
1 parent fa56a22 commit 9cb8dee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ const Item = forwardRef<HTMLDivElement, ItemProps>(({
useEffect(() => {
if (itemRef.current) {
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
setTooltip(itemRef.current, action.desc || action.name as string);
setTooltip(itemRef.current, action.desc || action.name as string, {
placement: 'top',
delay: 50,
});
}
}, [itemRef.current, action]);
return (
Expand Down

0 comments on commit 9cb8dee

Please sign in to comment.