From 537cac224a974a8ed64f998d21c01bb8fd8e817f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com> Date: Tue, 30 May 2023 10:00:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=92=AD=E6=94=BE=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=B1=8F=E8=94=BD=E5=8F=B3=E9=94=AE=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/course/video.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/pages/course/video.tsx b/src/pages/course/video.tsx index 096e19f..af1c4c2 100644 --- a/src/pages/course/video.tsx +++ b/src/pages/course/video.tsx @@ -32,6 +32,13 @@ const CoursePalyPage = () => { e = e || window.event; return false; }; + return () => { + document.oncontextmenu = function (e) { + /*恢复浏览器默认右键事件*/ + e = e || window.event; + return true; + }; + }; }, [params.courseId, params.hourId]); useEffect(() => { @@ -170,6 +177,11 @@ const CoursePalyPage = () => { className={styles["close-btn"]} onClick={() => { window.player && window.player.destroy(); + document.oncontextmenu = function (e) { + /*恢复浏览器默认右键事件*/ + e = e || window.event; + return true; + }; navigate(-1); }} >