From 83eb664a452181c6df746033165cfe1acaceacb9 Mon Sep 17 00:00:00 2001 From: wojiaoyishang Date: Mon, 20 Jan 2025 16:44:39 +0800 Subject: [PATCH] =?UTF-8?q?Update:=20=EF=BC=88=E6=AD=A5=E9=AA=A4=E5=A4=87?= =?UTF-8?q?=E4=BB=BD=EF=BC=89=E6=9B=B4=E6=94=B9=E4=B8=BB=E9=A2=98=E8=89=B2?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/system/component/pear/module/admin.js | 10 ---------- templates/system/common/footer.html | 1 + templates/system/index.html | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/static/system/component/pear/module/admin.js b/static/system/component/pear/module/admin.js index 78c8285..02a11ff 100644 --- a/static/system/component/pear/module/admin.js +++ b/static/system/component/pear/module/admin.js @@ -299,16 +299,6 @@ layui.define(['jquery', 'tools', 'element', 'yaml', 'form', 'tabPage', 'menu', ' const variableKey = "--global-primary-color"; const variableVal = localStorage.getItem("theme-color-color"); document.documentElement.style.setProperty(variableKey, variableVal); - - /* 遍历所有 iframe 更改主题色 */ - const iframes = document.querySelectorAll('iframe'); - iframes.forEach(function(iframe) { - try { - const iframeDocument = iframe.contentDocument || iframe.contentWindow.document; - // 设置 iframe 中的主题色 - iframeDocument.documentElement.style.setProperty(variableKey, variableVal); - } catch (e) {} - }); } /** diff --git a/templates/system/common/footer.html b/templates/system/common/footer.html index 5547b5c..c919125 100644 --- a/templates/system/common/footer.html +++ b/templates/system/common/footer.html @@ -1,4 +1,5 @@