mirror of
https://github.com/imsyy/home.git
synced 2024-11-16 03:32:17 +08:00
屏蔽右键
This commit is contained in:
parent
5090ce2e89
commit
e5310257ed
11
src/App.vue
11
src/App.vue
|
@ -62,7 +62,6 @@ onMounted(() => {
|
|||
// 加载完成事件
|
||||
window.addEventListener("load", () => {
|
||||
console.log("加载完成");
|
||||
// console.clear();
|
||||
// 去除加载标记
|
||||
document.getElementsByTagName("body")[0].className = "";
|
||||
// 给加载动画添加结束标记
|
||||
|
@ -70,6 +69,16 @@ onMounted(() => {
|
|||
loadingBox.classList.add("loaded");
|
||||
});
|
||||
|
||||
// 屏蔽右键
|
||||
document.oncontextmenu = () => {
|
||||
ElMessage({
|
||||
message: "为了浏览体验,本站禁用右键",
|
||||
grouping: true,
|
||||
duration: 2000,
|
||||
});
|
||||
return false;
|
||||
};
|
||||
|
||||
// 鼠标中键事件
|
||||
window.addEventListener("mousedown", (event) => {
|
||||
if (event.button == 1) {
|
||||
|
|
|
@ -117,7 +117,7 @@ import {
|
|||
VolumeNotice,
|
||||
PlayWrong,
|
||||
} from "@icon-park/vue-next";
|
||||
import Player from "@/components/Player/index.vue";
|
||||
import Player from "@/components/Player/old.vue";
|
||||
import { mainStore } from "@/store";
|
||||
const store = mainStore();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user