优化预览画布缩放滑杆

新增桌面端可拖动缩放滑杆

保留按钮与视口中心缩放行为
This commit is contained in:
2026-09-05 14:42:02 +08:00
parent dd6bd0cb7b
commit 9d53c44241
@@ -471,6 +471,18 @@ export function PreviewWorkspace({
>
<Minus size={14} />
</button>
<input
type="range"
min={25}
max={200}
step={5}
value={Math.round(viewport.scale * 100)}
aria-label="画布缩放"
className="h-1 w-28 accent-orange-500"
onChange={(event) =>
actions.zoomToDisplayScale(Number(event.target.value) / 100)
}
/>
<button
type="button"
className="min-w-14 rounded px-2 py-1 text-[10px] tabular-nums hover:bg-black/5"