zhangxiao
2024-08-21 406a398a94d54b854472063f219ae87e8fcf4a98
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// import { _TouchEvent } from "types";
// import storeDecoration from "@/config/pinia/store-decoration";
// import VConsole from "vconsole";
// import env from "@/utils/tools/env";
 
// /** 监听浏览器后退事件 */
// const handleListenBack = (): void => {
//     window.addEventListener(
//         "popstate",
//         () => {
//             storeDecoration().SET_TRANSITION("slide-left");
//             storeDecoration().SET_ISBACK(true);
//         },
//         false
//     );
// };
// /** 禁止页面级的touchmove事件 */
// const disableTouchMove = (): void => {
//     document.body.addEventListener(
//         "touchmove",
//         function (e: _TouchEvent) {
//             if (e._isScroller) return;
//             // 阻止默认事件
//             e.preventDefault();
//         },
//         {
//             passive: false
//         }
//     );
// };
 
// handleListenBack();
// disableTouchMove();
 
// if (!env.prod()) {
//     new VConsole();
// }