diff --git a/packages/bbui/src/Tooltip/AbsTooltip.svelte b/packages/bbui/src/Tooltip/AbsTooltip.svelte index 78a4d5f609..3e8caa389e 100644 --- a/packages/bbui/src/Tooltip/AbsTooltip.svelte +++ b/packages/bbui/src/Tooltip/AbsTooltip.svelte @@ -22,12 +22,15 @@ export let position = TooltipPosition.Top export let type = TooltipType.Default export let text = "" + export let fixed = false let wrapper - let visible = false + let hovered = false let left = 0 let top = 0 + $: visible = hovered || fixed + const show = () => { const node = wrapper?.children?.[0] if (!node) { @@ -51,10 +54,10 @@ return } - visible = true + hovered = true } const hide = () => { - visible = false + hovered = false }