禁止双击放大
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||||
<title>yuanhe-ipad</title>
|
<title>yuanhe-ipad</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -29,9 +29,30 @@ export const ExamModal = ({ client, tab, onTabChange, onClose }: ExamModalProps)
|
|||||||
print: printDone,
|
print: printDone,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleDoubleClick = (e: React.MouseEvent) => {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleTouchStart = (e: React.TouchEvent) => {
|
||||||
|
if (e.touches.length > 1) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='fixed inset-0 z-40 flex items-center justify-center bg-black/50'>
|
<div
|
||||||
<div className='w-[960px] max-w-[95vw] bg-white rounded-2xl shadow-xl overflow-hidden text-sm'>
|
className='fixed inset-0 z-40 flex items-center justify-center bg-black/50'
|
||||||
|
style={{ touchAction: 'none' }}
|
||||||
|
onDoubleClick={handleDoubleClick}
|
||||||
|
onTouchStart={handleTouchStart}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className='w-[960px] max-w-[95vw] bg-white rounded-2xl shadow-xl overflow-hidden text-sm'
|
||||||
|
style={{ touchAction: 'none' }}
|
||||||
|
onDoubleClick={handleDoubleClick}
|
||||||
|
onTouchStart={handleTouchStart}
|
||||||
|
>
|
||||||
|
|
||||||
{/* Header 区域:增加了内边距 padding */}
|
{/* Header 区域:增加了内边距 padding */}
|
||||||
<div className='px-8 pt-6 pb-2'>
|
<div className='px-8 pt-6 pb-2'>
|
||||||
|
|||||||
Reference in New Issue
Block a user