Skip to content

Commit

Permalink
enhance: 代码风格调整
Browse files Browse the repository at this point in the history
  • Loading branch information
1587315093 committed Jul 9, 2023
1 parent 0527e17 commit eed9b53
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/picker-view/wheel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,14 @@ export const Wheel = memo<Props>(
handleWheel(state)
},
{
target: props.mouseWheel ? rootRef : undefined,
axis: 'y',
from: () => [0, y.get()],
preventDefault: true,
target: props.mouseWheel ? rootRef : undefined,
eventOptions: supportsPassive
? { passive: false }
: (false as unknown as AddEventListenerOptions),
eventOptions:
(supportsPassive as unknown as AddEventListenerOptions) && {
passive: false,
},
}
)

Expand Down Expand Up @@ -302,9 +303,8 @@ export const Wheel = memo<Props>(
if (prev.onSelect !== next.onSelect) return false
if (prev.renderLabel !== next.renderLabel) return false
if (prev.mouseWheel !== next.mouseWheel) return false
if (!isEqual(prev.column, next.column)) {
return false
}
if (!isEqual(prev.column, next.column)) return false

return true
}
)
Expand Down

0 comments on commit eed9b53

Please sign in to comment.