修复 bug

This commit is contained in:
eafonyang
2026-06-12 15:53:05 +08:00
parent 56ccb7b76a
commit 72d0872ced
9 changed files with 112 additions and 23 deletions
@@ -4,6 +4,8 @@ export function CyanSlider({
max,
step = 1,
onChange,
onInteractionStart,
onInteractionEnd,
disabled = false,
}: {
value: number;
@@ -11,6 +13,8 @@ export function CyanSlider({
max: number;
step?: number;
onChange: (v: number) => void;
onInteractionStart?: () => void;
onInteractionEnd?: () => void;
disabled?: boolean;
}) {
const fillPct = Math.max(
@@ -39,6 +43,11 @@ export function CyanSlider({
value={value}
className="cyan-slider relative z-10"
disabled={disabled}
onPointerDown={() => onInteractionStart?.()}
onFocus={() => onInteractionStart?.()}
onPointerUp={() => onInteractionEnd?.()}
onPointerCancel={() => onInteractionEnd?.()}
onBlur={() => onInteractionEnd?.()}
onChange={(e) => onChange(Number(e.target.value))}
/>
</div>