Skip to content

Commit

Permalink
fix(facade): set default style (#4613)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dushusir authored Feb 14, 2025
1 parent c274fc8 commit 4d1f5d1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/sheets/src/facade/f-worksheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,11 @@ export class FWorksheet extends FBaseInitialable {
* const fWorkbook = univerAPI.getActiveWorkbook();
* const fWorksheet = fWorkbook.getActiveSheet();
* fWorksheet.setDefaultStyle('default');
* // or
* // fWorksheet.setDefaultStyle({fs: 12, ff: 'Arial'});
* ```
*/
setDefaultStyle(style: string): FWorksheet {
setDefaultStyle(style: string | Nullable<IStyleData>): FWorksheet {
const unitId = this._workbook.getUnitId();
const subUnitId = this._worksheet.getSheetId();
this._commandService.syncExecuteCommand(SetWorksheetDefaultStyleMutation.id, {
Expand All @@ -225,6 +227,8 @@ export class FWorksheet extends FBaseInitialable {
* const fWorkbook = univerAPI.getActiveWorkbook();
* const fWorksheet = fWorkbook.getActiveSheet();
* fWorksheet.setRowDefaultStyle(0, 'default');
* // or
* // fWorksheet.setRowDefaultStyle(0, {fs: 12, ff: 'Arial'});
* ```
*/
setColumnDefaultStyle(index: number, style: string | Nullable<IStyleData>): FWorksheet {
Expand Down Expand Up @@ -255,6 +259,8 @@ export class FWorksheet extends FBaseInitialable {
* const fWorkbook = univerAPI.getActiveWorkbook();
* const fWorksheet = fWorkbook.getActiveSheet();
* fWorksheet.setColumnDefaultStyle(0, 'default');
* // or
* // fWorksheet.setColumnDefaultStyle(0, {fs: 12, ff: 'Arial'});
* ```
*/
setRowDefaultStyle(index: number, style: string | Nullable<IStyleData>): FWorksheet {
Expand Down

0 comments on commit 4d1f5d1

Please sign in to comment.