Browse Source

fix(@vben/web-ele): the main color tone for switching between dark and light themes has been reset (#6678)

pull/6680/head
螃蟹 6 months ago
committed by GitHub
parent
commit
adbf793e79
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      packages/effects/layouts/src/widgets/preferences/blocks/theme/builtin.vue

6
packages/effects/layouts/src/widgets/preferences/blocks/theme/builtin.vue

@ -104,7 +104,7 @@ function selectColor() {
watch(
() => [modelValue.value, props.isDark] as [BuiltinThemeType, boolean],
([themeType, isDark]) => {
([themeType, isDark], [_, isDarkPrev]) => {
const theme = builtinThemePresets.value.find(
(item) => item.type === themeType,
);
@ -113,7 +113,9 @@ watch(
? theme.darkPrimaryColor || theme.primaryColor
: theme.primaryColor;
themeColorPrimary.value = primaryColor || theme.color;
if (!(theme.type === 'custom' && isDark !== isDarkPrev)) {
themeColorPrimary.value = primaryColor || theme.color;
}
}
},
);

Loading…
Cancel
Save