Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(style): fix defualt theme style (#4657)
VicKun95d4feef5c5c
diff --git a/packages/sheets/src/model/range-theme-model.ts b/packages/sheets/src/model/range-theme-model.tsindex 62e855a282..420e96611c 100644--- a/packages/sheets/src/model/range-theme-model.ts+++ b/packages/sheets/src/model/range-theme-model.ts@@ -22,7 +22,7 @@ import { SheetInterceptorService } from '../services/sheet-interceptor/sheet-intimport { RangeThemeStyle } from './range-theme-util';import { buildInThemes } from './range-themes/build-in-theme.factory';-import { defaultRangeThemeStyle } from './range-themes/default';+import { defaultRangeThemeStyle, defaultRangeThemeStyleJSONWithLastRowStyle } from './range-themes/default';export interface IRangeThemeRangeInfo {range: IRange;@@ -59,6 +59,7 @@ export class SheetRangeThemeModel extends Disposable {private _initDefaultTheme() {this.registerDefaultRangeTheme(defaultRangeThemeStyle);+ this.registerDefaultRangeTheme(defaultRangeThemeStyleJSONWithLastRowStyle);for (const theme of buildInThemes) {this.registerDefaultRangeTheme(theme);}diff --git a/packages/sheets/src/model/range-themes/default.ts b/packages/sheets/src/model/range-themes/default.tsindex 08d0c35c4c..06111228d0 100644--- a/packages/sheets/src/model/range-themes/default.ts+++ b/packages/sheets/src/model/range-themes/default.ts@@ -35,6 +35,13 @@ const defaultRangeThemeStyleJSON: Omit<IRangeThemeStyleJSON, 'name'> = {rgb: 'rgb(217,225,242)',},},++};++export const defaultRangeThemeStyle = new RangeThemeStyle('default', defaultRangeThemeStyleJSON);++export const defaultRangeThemeStyleJSONWithLastRowStyle = new RangeThemeStyle('default-last-row', {+ ...defaultRangeThemeStyleJSON,lastRowStyle: {bd: {t: {@@ -47,5 +54,4 @@ const defaultRangeThemeStyleJSON: Omit<IRangeThemeStyleJSON, 'name'> = {ht: HorizontalAlign.CENTER,bl: BooleanNumber.TRUE,},-};-export const defaultRangeThemeStyle = new RangeThemeStyle('default', defaultRangeThemeStyleJSON);+});