diff --git a/src/layout/WorkbenchLayout.vue b/src/layout/WorkbenchLayout.vue
index 6269465..6c285e6 100644
--- a/src/layout/WorkbenchLayout.vue
+++ b/src/layout/WorkbenchLayout.vue
@@ -50,6 +50,14 @@
sports_esports
PK 工作台
+
+
+
@@ -129,6 +137,16 @@
+
+
+
+
+
@@ -154,6 +172,7 @@ const emit = defineEmits(['logout', 'go-back', 'stop-all'])
const currentView = ref('tk') // Default Tab
const autoDmMode = ref('config') // Default Sub-state: 'config' or 'browser'
+const adminLoaded = ref(false) // 懒加载:首次切换到管理后台时才加载 iframe
const handleGoToBrowser = async () => {
autoDmMode.value = 'browser'
@@ -175,6 +194,11 @@ const handleStopAll = () => {
// Watch for view changes to manage native Electron BrowserViews
watch(currentView, async (newVal, oldVal) => {
+ // 懒加载管理后台 iframe
+ if (newVal === 'shop' && !adminLoaded.value) {
+ adminLoaded.value = true
+ }
+
if (!isElectron()) return
if (newVal === 'auto_dm' && autoDmMode.value === 'browser') {