refactor(projects): combine theme tokens and theme settings. close #379

This commit is contained in:
Soybean
2024-07-20 04:00:32 +08:00
parent 958d0baf3f
commit 1d1b148c8f
7 changed files with 77 additions and 34 deletions

View File

@@ -125,7 +125,11 @@ export const useThemeStore = defineStore(SetupStoreId.Theme, () => {
/** Setup theme vars to html */
function setupThemeVarsToHtml() {
const { themeTokens, darkThemeTokens } = createThemeToken(themeColors.value, settings.value.recommendColor);
const { themeTokens, darkThemeTokens } = createThemeToken(
themeColors.value,
settings.value.tokens,
settings.value.recommendColor
);
addThemeVarsToHtml(themeTokens, darkThemeTokens);
}