Skip to content

Commit

Permalink
fix(image-viewer): 阻止双指缩放默认行为
Browse files Browse the repository at this point in the history
closed #1402
  • Loading branch information
sinbadmaster committed Sep 3, 2022
1 parent 4ff2c12 commit 69f50b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/image-viewer/image-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export default defineComponent({
});

const onWheel = (e: WheelEvent) => {
e.preventDefault();
const { deltaY, ctrlKey } = e;
// mac触摸板双指缩放时ctrlKey=true,deltaY>0为缩小 <0为放大
if (ctrlKey) {
Expand Down

0 comments on commit 69f50b8

Please sign in to comment.