From e5e7c665113799a836b191d5e825475a5cf84953 Mon Sep 17 00:00:00 2001 From: koory1st <32436334@qq.com> Date: Sun, 28 Jan 2024 19:45:33 +0800 Subject: [PATCH] fix(slider): add tooltip stop --- packages/slider/src/lib/button.svelte | 4 +++- packages/slider/src/lib/slider.svelte | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/slider/src/lib/button.svelte b/packages/slider/src/lib/button.svelte index 636f3a4..6eef00e 100644 --- a/packages/slider/src/lib/button.svelte +++ b/packages/slider/src/lib/button.svelte @@ -21,6 +21,8 @@ export let showTooltip = true; export let formatTooltip = null; $: tooltipValue = formatTooltip ? formatTooltip(value) : value; + /** @type {'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end'} */ + export let placement = 'top'; let button; $: hovering = false; @@ -183,7 +185,7 @@ - +
{ if (range) { @@ -262,6 +264,7 @@ bind:value={firstValue} disabled={sliderDisabled} {formatTooltip} + {placement} {resetSize} {showTooltip} {sliderSize} @@ -288,6 +291,7 @@ {vertical} {showTooltip} {formatTooltip} + {placement} /> {/if} {#if showStops}