Skip to content

Commit c018ddd

Browse files
committed
fix: ensure changeNeutralColor works
1 parent 1cad514 commit c018ddd

File tree

1 file changed

+1
-2
lines changed
  • packages/theme-generator/src/color-panel

1 file changed

+1
-2
lines changed

packages/theme-generator/src/color-panel/index.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,12 +508,11 @@ export default {
508508
changeFunctionColor(hex, type) {
509509
const oldColor = getOptionFromLocal(type);
510510
updateLocalOption(type, oldColor !== hex ? hex : null);
511-
511+
this[`${type}MainColor`] = hex;
512512
if (type === 'gray') {
513513
this.changeNeutralColor(false);
514514
return;
515515
}
516-
this[`${type}MainColor`] = hex;
517516
const { lightPalette, darkPalette } = generateFunctionalPalette(hex);
518517
updateStyleSheetColor(type, lightPalette, darkPalette);
519518
this.$nextTick(this.refreshColorTokens);

0 commit comments

Comments
 (0)