From e1699c4851f6ca397cd0ad1ff63f32c737654836 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Wed, 02 Apr 2025 19:14:54 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/debug.js | 50 +++++++++++++++++++++++++-------------------------
1 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/src/debug.js b/src/debug.js
index 5ae2c82..0be8cc8 100644
--- a/src/debug.js
+++ b/src/debug.js
@@ -1,5 +1,5 @@
-import DisableDevtool from 'disable-devtool';
-import { ElMessageBox } from 'element-plus';
+import DisableDevtool from 'disable-devtool'
+import { ElMessageBox } from 'element-plus'
/**
* 安全警告的HTML模板, 使用Tailwind CSS样式
@@ -17,34 +17,34 @@
如您频繁此类操作,系统将记录上报。
</p>
</div>
-</div>`;
+</div>`
/**
* Element Plus 消息框配置选项
*/
const ALERT_OPTIONS = {
- type: 'error',
- showClose: false,
- center: true,
- closeOnClickModal: false,
- closeOnPressEscape: false,
- dangerouslyUseHTMLString: true,
-};
+ type: 'error',
+ showClose: false,
+ center: true,
+ closeOnClickModal: false,
+ closeOnPressEscape: false,
+ dangerouslyUseHTMLString: true,
+}
export default () => {
- if (import.meta.env.VITE_APP_DEBUG_SWITCH === 'false') return;
+ if (import.meta.env.VITE_APP_DEBUG_SWITCH === 'false') return
- const debugKey = import.meta.env.VITE_APP_DEBUG_KEY;
- let flag = false;
- DisableDevtool({
- md5: DisableDevtool.md5(debugKey),
- disableMenu: false,
- ondevtoolopen: (type, next) => {
- if (!flag) ElMessageBox.alert(SECURITY_WARNING_TEMPLATE, '安全警告', ALERT_OPTIONS);
- flag = true;
- setTimeout(() => {
- next();
- }, 5000);
- },
- });
-};
+ const debugKey = import.meta.env.VITE_APP_DEBUG_KEY
+ let flag = false
+ DisableDevtool({
+ md5: DisableDevtool.md5(debugKey),
+ disableMenu: false,
+ ondevtoolopen: (type, next) => {
+ if (!flag) ElMessageBox.alert(SECURITY_WARNING_TEMPLATE, '安全警告', ALERT_OPTIONS)
+ flag = true
+ setTimeout(() => {
+ next()
+ }, 5000)
+ },
+ })
+}
--
Gitblit v1.9.3