屏蔽浏览器自带右键菜单
This commit is contained in:
parent
509fed80d4
commit
410633e04f
12
src/App.vue
12
src/App.vue
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<div class="fit">
|
||||
<q-ajax-bar position="top" color="accent" size="5px" skip-hijack />
|
||||
<q-menu context-menu />
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
@ -37,9 +38,20 @@ export default defineComponent({
|
|||
};
|
||||
|
||||
window.document.body.onclick = (evt: any) => {
|
||||
if ((<any>window).touchPriority) {
|
||||
return;
|
||||
}
|
||||
EventBus.getInstance().emit(EventNamesDefine.DocumentBodyClick, evt);
|
||||
};
|
||||
|
||||
if ("ontouchstart" in document.documentElement === true) {
|
||||
window.document.body.ontouchstart = (evt: any) => {
|
||||
if ((<any>window).touchPriority) {
|
||||
EventBus.getInstance().emit(EventNamesDefine.DocumentBodyClick, evt);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
document.body.classList.add("overflow-hidden");
|
||||
|
||||
(window as any).controlLogout = () => {
|
||||
|
|
Loading…
Reference in New Issue