Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix(design): change tooltip to not remain active after hover (#1756)

白熱2019a775cc71
diff --git a/packages/design/src/components/tooltip/Tooltip.tsx b/packages/design/src/components/tooltip/Tooltip.tsx
index 00bc36d3a4..635ab7fbb2 100644
--- a/packages/design/src/components/tooltip/Tooltip.tsx
+++ b/packages/design/src/components/tooltip/Tooltip.tsx
@@ -52,6 +52,7 @@ export const Tooltip = forwardRef((props: ITooltipProps, ref: Ref<TooltipRef>) =
builtinPlacements={placements}
placement={placement}
mouseEnterDelay={0.2}
+ mouseLeaveDelay={0}
showArrow
destroyTooltipOnHide
onVisibleChange={onVisibleChange}
diff --git a/packages/sheets-ui/src/views/status-bar/CopyableStatisticItem.tsx b/packages/sheets-ui/src/views/status-bar/CopyableStatisticItem.tsx
index be1c46c2fd..208dd44abc 100644
--- a/packages/sheets-ui/src/views/status-bar/CopyableStatisticItem.tsx
+++ b/packages/sheets-ui/src/views/status-bar/CopyableStatisticItem.tsx
@@ -68,7 +68,7 @@ export const CopyableStatisticItem: React.FC<IStatisticItem> = (item: IStatistic
});
};
return (
- <Tooltip title={localeService.t('statusbar.clickToCopy')} placement="top" style={{ pointerEvents: 'none' }}>
+ <Tooltip title={localeService.t('statusbar.clickToCopy')} placement="top">
<div key={item.name} className={styles.statisticItem} onClick={copyToClipboard}>
<span>
{`${localeService.t(
diff --git a/packages/ui/src/common/z-index-manager.ts b/packages/ui/src/common/z-index-manager.ts
index e0a66c16c2..cd5349bac5 100644
--- a/packages/ui/src/common/z-index-manager.ts
+++ b/packages/ui/src/common/z-index-manager.ts
@@ -15,6 +15,9 @@
*/
export class ZIndexManager {
+ static #MAX_INDEX = 2147483647;
+ static #MIN_INDEX = -2147483647;
+
private _list: Map<string, number> = new Map();
setIndex(name: string, index: number) {
diff --git a/packages/ui/src/views/components/doc-bars/index.module.less b/packages/ui/src/views/components/doc-bars/index.module.less
index 2d256d1d99..728aa6b249 100644
--- a/packages/ui/src/views/components/doc-bars/index.module.less
+++ b/packages/ui/src/views/components/doc-bars/index.module.less
@@ -116,11 +116,13 @@
flex-wrap: wrap;
&:not(:last-child) {
- margin-bottom: var(--margin-xs);
-
&::after {
content: initial;
}
+
+ > *:last-child {
+ margin-bottom: var(--margin-xs);
+ }
}
}
}