Skip to content

Commit

Permalink
fix(amis-editor): 优化style2ThemeCss,避免旧的themeCss样式丢失
Browse files Browse the repository at this point in the history
  • Loading branch information
wibetter committed Jan 15, 2024
1 parent ae8500b commit 1b8bc71
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/amis-editor-core/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import isPlainObject from 'lodash/isPlainObject';
import isEqual from 'lodash/isEqual';
import isNumber from 'lodash/isNumber';
import debounce from 'lodash/debounce';
import merge from 'lodash/merge';

const {
guid,
Expand Down Expand Up @@ -1224,10 +1225,10 @@ export function style2ThemeCss(data: any) {
baseControlClassName
};
} else {
themeCss.baseControlClassName = {
...data.themeCss.baseControlClassName,
...baseControlClassName
};
themeCss.baseControlClassName = merge(
data.themeCss.baseControlClassName,
baseControlClassName
);
}
return {
...data,
Expand Down

0 comments on commit 1b8bc71

Please sign in to comment.