fix: theme extend usage not work #2708

This commit is contained in:
fangsmile 2024-10-31 16:01:27 +08:00
parent b355f901e4
commit cb0c20d36a

View File

@ -788,7 +788,8 @@ export class TableTheme implements ITableThemeDefine {
return hasThemeProperty(obj, names) || hasThemeProperty(superTheme, names); return hasThemeProperty(obj, names) || hasThemeProperty(superTheme, names);
} }
extends(obj: PartialTableThemeDefine): TableTheme { extends(obj: PartialTableThemeDefine): TableTheme {
return new TableTheme(ingoreNoneValueMerge({}, this.internalTheme.obj, obj), this.internalTheme.superTheme); const cloneObj = ingoreNoneValueMerge({}, this.internalTheme.obj);
return new TableTheme(ingoreNoneValueMerge(cloneObj, obj), this.internalTheme.superTheme);
} }
private getStyle(style: ThemeStyle) { private getStyle(style: ThemeStyle) {
const that = this; const that = this;