Skip to content

Commit 2044858

Browse files
fix: 消除 UltraplanChoiceDialog 中的 wheelDown/wheelUp as any
Ink Key 类型已包含 wheelDown/wheelUp 属性,直接访问即可。
1 parent da10c45 commit 2044858

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/components/ultraplan/UltraplanChoiceDialog.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ export function UltraplanChoiceDialog({
8787
if (!isScrollable) return;
8888
const halfPage = Math.max(1, Math.floor(visibleHeight / 2));
8989

90-
if ((key.ctrl && input === 'd') || (key as any).wheelDown) {
91-
const step = (key as any).wheelDown ? 3 : halfPage;
90+
if ((key.ctrl && input === 'd') || key.wheelDown) {
91+
const step = key.wheelDown ? 3 : halfPage;
9292
setScrollOffset(prev => Math.min(prev + step, maxOffset));
93-
} else if ((key.ctrl && input === 'u') || (key as any).wheelUp) {
94-
const step = (key as any).wheelUp ? 3 : halfPage;
93+
} else if ((key.ctrl && input === 'u') || key.wheelUp) {
94+
const step = key.wheelUp ? 3 : halfPage;
9595
setScrollOffset(prev => Math.max(prev - step, 0));
9696
}
9797
});

0 commit comments

Comments
 (0)