From e66dd67376f5a163d3c07b4e07a75b55f99d52b6 Mon Sep 17 00:00:00 2001 From: Cano1997 <1978141412@qq.com> Date: Mon, 13 Oct 2025 19:39:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E4=B8=AD=E6=8F=92=E4=BB=B6=E5=8F=98=E9=87=8F?= =?UTF-8?q?=EF=BC=8C=E4=B8=BB=E9=A2=98=E6=8F=92=E4=BB=B6=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E4=B8=BB=E9=A2=98=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/runtime/CHANGELOG.md | 4 ++++ packages/runtime/src/utils/theme-util/theme-util.ts | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/packages/runtime/CHANGELOG.md b/packages/runtime/CHANGELOG.md index 6dfa498497c..5dfe03c7a63 100644 --- a/packages/runtime/CHANGELOG.md +++ b/packages/runtime/CHANGELOG.md @@ -7,6 +7,10 @@ ## [Unreleased] +### Added + +- 添加主题工具中插件变量,主题插件中颜色主题插件支持自定义主题切换 + ## [0.7.41-alpha.31] - 2025-10-11 ### Added diff --git a/packages/runtime/src/utils/theme-util/theme-util.ts b/packages/runtime/src/utils/theme-util/theme-util.ts index 8016da0e19b..140dc486c4d 100644 --- a/packages/runtime/src/utils/theme-util/theme-util.ts +++ b/packages/runtime/src/utils/theme-util/theme-util.ts @@ -34,6 +34,13 @@ export class ThemeUtil implements IApiThemeUtil { */ readonly evt = new QXEventEx(); + /** + * @description 插件主题 + * @type {IAppUITheme[]} + * @memberof ThemeUtil + */ + public pluginTheme: IAppUITheme[] = []; + /** * @description 加载主题插件 * @param {IAppUITheme} theme @@ -57,6 +64,8 @@ export class ThemeUtil implements IApiThemeUtil { if (type === 'COLOR') { this.setThemeParams(theme, data); this.setTheme(theme.themeTag!); + // 只计算颜色主题插件 + this.pluginTheme.push(theme); } else { this.html.classList.add(theme.themeTag!); } -- Gitee