wuwenyi пре 4 дана
родитељ
комит
11d1b57a37
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      src/components/Layout/index.vue

+ 2 - 1
src/components/Layout/index.vue

@@ -16,7 +16,8 @@ import Sidebar from '@/components/Sidebar/index.vue'
 import Navbar from '@/components/Navbar/index.vue'
 import { isEmbedded } from '@/utils/auth'
 
-const embedded = isEmbedded()
+// 嵌入态判定:宿主通过 ?embed=1 显式标记(主),iframe 环境探测兜底
+const embedded = new URLSearchParams(window.location.search).get('embed') === '1' || isEmbedded()
 </script>
 
 <style scoped>