diff --git a/packages/runtime/CHANGELOG.md b/packages/runtime/CHANGELOG.md index 6dfa498497c96d2aba1951810fba39c223d0180b..5dfe03c7a63b90740d18660bbedaf8cf4ef4eb0c 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 8016da0e19b87461f3e665bd1d0b83678cc5c232..140dc486c4d7490b087664a3907e0553ec266488 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!); }