Skip to content

Commit

Permalink
fix: reset theme rowHeaderStyle config
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Feb 27, 2024
1 parent e40f0c0 commit 3e3dbac
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
32 changes: 16 additions & 16 deletions packages/vtable/src/core/BaseTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2981,16 +2981,16 @@ export abstract class BaseTable extends EventTarget implements BaseTableAPI {
this.options.autoWrapText
);
} else {
let defaultStyle;
if (layoutMap.isColumnHeader(col, row) || layoutMap.isBottomFrozenRow(col, row)) {
defaultStyle = this.theme.headerStyle;
} else if (this.internalProps.transpose && layoutMap.isRowHeader(col, row)) {
defaultStyle = this.theme.headerStyle;
} else if (layoutMap.isRowHeader(col, row) || layoutMap.isRightFrozenColumn(col, row)) {
defaultStyle = this.theme.rowHeaderStyle;
} else {
defaultStyle = this.theme.cornerHeaderStyle;
}
// let defaultStyle;
// if (layoutMap.isColumnHeader(col, row) || layoutMap.isBottomFrozenRow(col, row)) {
// defaultStyle = this.theme.headerStyle;
// } else if (this.internalProps.transpose && layoutMap.isRowHeader(col, row)) {
// defaultStyle = this.theme.headerStyle;
// } else if (layoutMap.isRowHeader(col, row) || layoutMap.isRightFrozenColumn(col, row)) {
// defaultStyle = this.theme.rowHeaderStyle;
// } else {
// defaultStyle = this.theme.cornerHeaderStyle;
// }
// const styleClass = hd.headerType.StyleClass; //BaseHeader文件
// const { style } = hd;
const style = hd?.style || {};
Expand All @@ -2999,12 +2999,12 @@ export abstract class BaseTable extends EventTarget implements BaseTableAPI {
}
cacheStyle = <FullExtendStyle>headerStyleContents.of(
style,
defaultStyle,
// layoutMap.isColumnHeader(col, row) || layoutMap.isBottomFrozenRow(col, row)
// ? this.theme.headerStyle
// : layoutMap.isRowHeader(col, row) || layoutMap.isRightFrozenColumn(col, row)
// ? this.theme.rowHeaderStyle
// : this.theme.cornerHeaderStyle,
// defaultStyle,
layoutMap.isColumnHeader(col, row) || layoutMap.isBottomFrozenRow(col, row)
? this.theme.headerStyle
: layoutMap.isRowHeader(col, row) || layoutMap.isRightFrozenColumn(col, row)
? this.theme.rowHeaderStyle
: this.theme.cornerHeaderStyle,
{
col,
row,
Expand Down
6 changes: 3 additions & 3 deletions packages/vtable/src/scenegraph/scenegraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1494,9 +1494,9 @@ export class Scenegraph {
this.rowHeaderGroup,
this.isPivot
? this.table.theme.rowHeaderStyle.frameStyle
: this.table.internalProps.transpose
? this.table.theme.headerStyle.frameStyle
: this.table.theme.bodyStyle.frameStyle,
: // : this.table.internalProps.transpose
// ? this.table.theme.headerStyle.frameStyle
this.table.theme.bodyStyle.frameStyle,
this.rowHeaderGroup.role,
isListTableWithFrozen ? [true, false, true, true] : undefined
);
Expand Down
2 changes: 1 addition & 1 deletion packages/vtable/src/themes/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ export class TableTheme implements ITableThemeDefine {
{},
this.defaultStyle,
superTheme.rowHeaderStyle,
obj.rowHeaderStyle // ?? obj.headerStyle
obj.rowHeaderStyle ?? obj.headerStyle
);
this._rowHeader = this.getStyle(header);
}
Expand Down

0 comments on commit 3e3dbac

Please sign in to comment.