屏蔽右键

This commit is contained in:
底层用户 2023-01-15 12:41:33 +08:00
parent 5090ce2e89
commit e5310257ed
2 changed files with 11 additions and 2 deletions

View File

@ -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) {

View File

@ -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();