From cafaebc42aa1f48f49683cd1fa216a0bca833668 Mon Sep 17 00:00:00 2001 From: lumixraku Date: Sat, 14 Dec 2024 11:17:44 +0800 Subject: [PATCH] chore: better code --- .../src/components/sheets/sheet-skeleton.ts | 5 + .../src/controllers/prompt.controller.ts | 2 +- .../commands/commands/set-scroll.command.ts | 2 +- .../scroll.render-controller.ts | 4 +- packages/sheets-ui/src/facade/f-workbook.ts | 6 +- packages/sheets-ui/src/facade/f-worksheet.ts | 9 +- packages/sheets-ui/src/index.ts | 134 ++++++++---------- packages/sheets/src/facade/f-worksheet.ts | 20 +-- 8 files changed, 85 insertions(+), 97 deletions(-) diff --git a/packages/engine-render/src/components/sheets/sheet-skeleton.ts b/packages/engine-render/src/components/sheets/sheet-skeleton.ts index 50fb1545cbf9..25c63537b086 100644 --- a/packages/engine-render/src/components/sheets/sheet-skeleton.ts +++ b/packages/engine-render/src/components/sheets/sheet-skeleton.ts @@ -324,6 +324,11 @@ export class SpreadsheetSkeleton extends Skeleton { return this._visibleRange; } + /** + * Get range needs to render. + * @param viewportKey + * @returns + */ visibleRangeByViewportKey(viewportKey: SHEET_VIEWPORT_KEY): Nullable { return this._cacheRangeMap.get(viewportKey); } diff --git a/packages/sheets-formula-ui/src/controllers/prompt.controller.ts b/packages/sheets-formula-ui/src/controllers/prompt.controller.ts index 5cb50a0eb07f..2dec228bbd80 100644 --- a/packages/sheets-formula-ui/src/controllers/prompt.controller.ts +++ b/packages/sheets-formula-ui/src/controllers/prompt.controller.ts @@ -443,7 +443,7 @@ export class PromptController extends Disposable { const d = new DisposableCollection(); // response events from selection control, when selection control is created - // this is so weird !!! + // this is so weird !!! why didn't selection control handle move event itself ??? this.disposeWithMe(merge(this._refSelectionsService.selectionSet$, this._refSelectionsService.selectionMoveEnd$).subscribe((selections) => { d.dispose(); diff --git a/packages/sheets-ui/src/commands/commands/set-scroll.command.ts b/packages/sheets-ui/src/commands/commands/set-scroll.command.ts index 185d1ff48c11..a598e3e1e22f 100644 --- a/packages/sheets-ui/src/commands/commands/set-scroll.command.ts +++ b/packages/sheets-ui/src/commands/commands/set-scroll.command.ts @@ -130,7 +130,7 @@ export interface IScrollToCellCommandParams { } /** - * Scroll to make the range at top left edge of viewport. + * The command is used to scroll to the specific cell if the target cell is not in the viewport. */ export const ScrollToCellCommand: ICommand = { id: 'sheet.command.scroll-to-cell', diff --git a/packages/sheets-ui/src/controllers/render-controllers/scroll.render-controller.ts b/packages/sheets-ui/src/controllers/render-controllers/scroll.render-controller.ts index 7919202055e8..a17a7fb40383 100644 --- a/packages/sheets-ui/src/controllers/render-controllers/scroll.render-controller.ts +++ b/packages/sheets-ui/src/controllers/render-controllers/scroll.render-controller.ts @@ -62,8 +62,6 @@ export class SheetsScrollRenderController extends Disposable implements IRenderM this._wheelEventListener(); this._scrollBarEventListener(); this._initSkeletonListener(); - - window.src = this; } private _wheelEventListener() { @@ -472,7 +470,7 @@ export class SheetsScrollRenderController extends Disposable implements IRenderM return skeleton.getRangeByViewBound(vpInfo.viewBound); } - // why so complicated? scrollToCell do the same thing + // why so complicated? ScrollRenderController@scrollToCell do the same thing, including the scenario of freezing. // eslint-disable-next-line max-lines-per-function, complexity private _scrollToCell(row: number, column: number, forceTop?: boolean, forceLeft?: boolean): boolean { const { rowHeightAccumulation, columnWidthAccumulation } = this._sheetSkeletonManagerService.getCurrent()?.skeleton ?? {}; diff --git a/packages/sheets-ui/src/facade/f-workbook.ts b/packages/sheets-ui/src/facade/f-workbook.ts index 18d239875eb7..c29576d0a486 100644 --- a/packages/sheets-ui/src/facade/f-workbook.ts +++ b/packages/sheets-ui/src/facade/f-workbook.ts @@ -14,11 +14,9 @@ * limitations under the License. */ -import type { awaitTime, ICommandService, type IDisposable, ILogService, Nullable, toDisposable } from '@univerjs/core'; -import type { IEditorBridgeServiceVisibleParam } from '@univerjs/sheets-ui'; -import type { IHoverRichTextInfo, IHoverRichTextPosition } from '../services/hover-manager.service'; -import type { IScrollState } from '../services/scroll-manager.service'; +import { awaitTime, ICommandService, IDisposable, ILogService, Nullable, toDisposable } from '@univerjs/core'; import { DeviceInputEventType, IRenderManagerService } from '@univerjs/engine-render'; +import type { IEditorBridgeServiceVisibleParam, IHoverRichTextInfo, IHoverRichTextPosition, IScrollState } from '@univerjs/sheets-ui'; import { HoverManagerService, SetCellEditVisibleOperation, SheetScrollManagerService } from '@univerjs/sheets-ui'; import { FWorkbook } from '@univerjs/sheets/facade'; import { type IDialogPartMethodOptions, IDialogService, type ISidebarMethodOptions, ISidebarService, KeyCode } from '@univerjs/ui'; diff --git a/packages/sheets-ui/src/facade/f-worksheet.ts b/packages/sheets-ui/src/facade/f-worksheet.ts index fac4de2ca99c..35596cea27b1 100644 --- a/packages/sheets-ui/src/facade/f-worksheet.ts +++ b/packages/sheets-ui/src/facade/f-worksheet.ts @@ -16,14 +16,11 @@ import type { IDisposable, IRange, Nullable } from '@univerjs/core'; import type { RenderManagerService } from '@univerjs/engine-render'; -import type { IScrollState, IViewportScrollState } from '../services/scroll-manager.service'; +import type { IScrollState, IViewportScrollState } from '@univerjs/sheets-ui'; import { ICommandService, toDisposable } from '@univerjs/core'; import { IRenderManagerService, SHEET_VIEWPORT_KEY, sheetContentViewportKeys } from '@univerjs/engine-render'; +import { ChangeZoomRatioCommand, SheetScrollManagerService, SheetSkeletonManagerService, SheetsScrollRenderController } from '@univerjs/sheets-ui'; import { FWorksheet } from '@univerjs/sheets/facade'; -import { ChangeZoomRatioCommand } from '../commands/commands/set-zoom-ratio.command'; -import { SheetsScrollRenderController } from '../controllers/render-controllers/scroll.render-controller'; -import { SheetScrollManagerService } from '../services/scroll-manager.service'; -import { SheetSkeletonManagerService } from '../services/sheet-skeleton-manager.service'; export interface IFWorksheetSkeletonMixin { /** @@ -93,7 +90,7 @@ export class FWorksheetSkeletonMixin extends FWorksheet implements IFWorksheetSk } /** - * Return visible range. + * Return visible range, sum view range of 4 viewports. * @returns IRange */ getVisibleRange(): IRange { diff --git a/packages/sheets-ui/src/index.ts b/packages/sheets-ui/src/index.ts index 68f87b4eed92..8c0e67a21ce5 100644 --- a/packages/sheets-ui/src/index.ts +++ b/packages/sheets-ui/src/index.ts @@ -16,107 +16,99 @@ import './global.css'; -export { SheetsUIPart } from './consts/ui-name'; -export { SHEET_UI_PLUGIN_NAME } from './consts/plugin-name'; export { getEditorObject } from './basics/editor/get-editor-object'; -export { SheetsScrollRenderController } from './controllers/render-controllers/scroll.render-controller'; -export { SheetScrollManagerService } from './services/scroll-manager.service'; -export { deriveStateFromActiveSheet$, getCurrentExclusiveRangeInterest$, getCurrentRangeDisable$, getObservableWithExclusiveRange$ } from './controllers/menu/menu-util'; -export { SheetsRenderService } from './services/sheets-render.service'; -export { calculateDocSkeletonRects, getCustomRangePosition, getEditingCustomRangePosition } from './services/utils/doc-skeleton-util'; +export { EMBEDDING_FORMULA_EDITOR_COMPONENT_KEY, RANGE_SELECTOR_COMPONENT_KEY, SHEET_VIEW_KEY } from './common/keys'; +export { useActiveWorkbook, useActiveWorksheet, useWorkbooks } from './components/hook'; +export { SHEET_UI_PLUGIN_NAME } from './consts/plugin-name'; +export { SheetsUIPart } from './consts/ui-name'; export { AutoFillController } from './controllers/auto-fill.controller'; +export { AFFECT_LAYOUT_STYLES, AutoHeightController } from './controllers/auto-height.controller'; +export { AutoWidthController } from './controllers/auto-width.controller'; export { CellCustomRenderController } from './controllers/cell-custom-render.controller'; +export { type IUniverSheetsUIConfig } from './controllers/config.schema'; +export { DragRenderController } from './controllers/drag-render.controller'; +export { EditingRenderController } from './controllers/editor/editing.render-controller'; +export { FormulaEditorController } from './controllers/editor/formula-editor.controller'; +export { HoverRenderController } from './controllers/hover-render.controller'; +export { PASTE_SPECIAL_MENU_ID, SheetMenuPosition } from './controllers/menu/menu'; +export { deriveStateFromActiveSheet$, getCurrentExclusiveRangeInterest$, getCurrentRangeDisable$, getObservableWithExclusiveRange$ } from './controllers/menu/menu-util'; +export { SheetPermissionInitController } from './controllers/permission/sheet-permission-init.controller'; +export { SheetPermissionInterceptorBaseController } from './controllers/permission/sheet-permission-interceptor-base.controller'; +export { HeaderFreezeRenderController } from './controllers/render-controllers/freeze.render-controller'; +export { HeaderMoveRenderController } from './controllers/render-controllers/header-move.render-controller'; +export { HeaderResizeRenderController } from './controllers/render-controllers/header-resize.render-controller'; +export { SheetsScrollRenderController } from './controllers/render-controllers/scroll.render-controller'; +export { SheetRenderController } from './controllers/render-controllers/sheet.render-controller'; export { SheetUIController } from './controllers/sheet-ui.controller'; -export { PASTE_SPECIAL_MENU_ID } from './controllers/menu/menu'; -export { whenFormulaEditorActivated } from './controllers/shortcuts/utils'; +export { whenFormulaEditorActivated, whenSheetEditorFocused } from './controllers/shortcuts/utils'; +export { StatusBarController } from './controllers/status-bar.controller'; export { getCoordByCell, getCoordByOffset, getSheetObject, getTransformCoord, } from './controllers/utils/component-tools'; +export { discreteRangeToRange, rangeToDiscreteRange, virtualizeDiscreteRanges } from './controllers/utils/range-tools'; +export type { IDiscreteRange } from './controllers/utils/range-tools'; export { matchedSelectionByRowColIndex as checkInHeaderRanges } from './controllers/utils/selections-tools'; -export { useActiveWorkbook, useActiveWorksheet, useWorkbooks } from './components/hook'; -export { whenSheetEditorFocused } from './controllers/shortcuts/utils'; -export type { IEditorBridgeServiceParam } from './services/editor-bridge.service'; +export { useHighlightRange } from './hooks/useHighlightRange'; +export { UniverSheetsMobileUIPlugin } from './mobile-plugin'; +export { UniverSheetsUIPlugin } from './plugin'; export { AutoFillService, IAutoFillService } from './services/auto-fill/auto-fill.service'; export { getAutoFillRepeatRange } from './services/auto-fill/tools'; -export type { ICopyDataPiece, ISheetAutoFillHook } from './services/auto-fill/type'; -export { APPLY_TYPE, DATA_TYPE, type IAutoFillRule } from './services/auto-fill/type'; -export { type ICopyDataInTypeIndexInfo } from './services/auto-fill/type'; +export { APPLY_TYPE, DATA_TYPE, type IAutoFillRule, type ICopyDataInTypeIndexInfo } from './services/auto-fill/type'; +export type { IAutoFillLocation, ICopyDataPiece, ISheetAutoFillHook } from './services/auto-fill/type'; +export { type ICanvasPopup, SheetCanvasPopManagerService } from './services/canvas-pop-manager.service'; +export { CellAlertManagerService, CellAlertType, type ICellAlert } from './services/cell-alert-manager.service'; export { ISheetClipboardService, PREDEFINED_HOOK_NAME, SheetClipboardService, } from './services/clipboard/clipboard.service'; -export type { ICellDataWithSpanInfo, ICopyPastePayload, ISheetClipboardHook, ISheetDiscreteRangeLocation } from './services/clipboard/type'; export { COPY_TYPE } from './services/clipboard/type'; -export { getRepeatRange } from './services/clipboard/utils'; -export { EditingRenderController } from './controllers/editor/editing.render-controller'; -export { CellEditorManagerService, ICellEditorManagerService } from './services/editor/cell-editor-manager.service'; -export { IFormulaEditorManagerService } from './services/editor/formula-editor-manager.service'; +export type { ICellDataWithSpanInfo, ICopyPastePayload, ISheetClipboardHook, ISheetDiscreteRangeLocation } from './services/clipboard/type'; +export { getRepeatRange, mergeSetRangeValues } from './services/clipboard/utils'; +export { DragManagerService, type IDragCellPosition } from './services/drag-manager.service'; export { EditorBridgeService, IEditorBridgeService, type IEditorBridgeServiceVisibleParam, } from './services/editor-bridge.service'; -export { MarkSelectionService } from './services/mark-selection/mark-selection.service'; -export { IMarkSelectionService } from './services/mark-selection/mark-selection.service'; -export { SheetSelectionRenderService } from './services/selection/selection-render.service'; -export { genSelectionByRange, selectionDataForSelectAll as getAllSelection, getTopLeftSelectionOfCurrSheet } from './services/selection/base-selection-render.service'; -export { BaseSelectionRenderService, ISheetSelectionRenderService } from './services/selection/base-selection-render.service'; -export { SelectionControl, SelectionControl as SelectionShape } from './services/selection/selection-control'; -export { SelectionShapeExtension } from './services/selection/selection-shape-extension'; -export { genNormalSelectionStyle } from './services/selection/const'; -export type { ISheetSkeletonManagerParam } from './services/sheet-skeleton-manager.service'; -export { SheetSkeletonManagerService } from './services/sheet-skeleton-manager.service'; -export { attachPrimaryWithCoord, attachRangeWithCoord, attachSelectionWithCoord } from './services/selection/util'; -export { UniverSheetsUIPlugin } from './plugin'; -export { SheetRenderController } from './controllers/render-controllers/sheet.render-controller'; +export type { IEditorBridgeServiceParam } from './services/editor-bridge.service'; +export { CellEditorManagerService, ICellEditorManagerService } from './services/editor/cell-editor-manager.service'; +export { IFormulaEditorManagerService } from './services/editor/formula-editor-manager.service'; export { HoverManagerService } from './services/hover-manager.service'; -export { DragManagerService } from './services/drag-manager.service'; -export { CellAlertManagerService, CellAlertType, type ICellAlert } from './services/cell-alert-manager.service'; -export { HoverRenderController } from './controllers/hover-render.controller'; -export { DragRenderController } from './controllers/drag-render.controller'; -export { EMBEDDING_FORMULA_EDITOR_COMPONENT_KEY, RANGE_SELECTOR_COMPONENT_KEY, SHEET_VIEW_KEY } from './common/keys'; -export { type ICanvasPopup, SheetCanvasPopManagerService } from './services/canvas-pop-manager.service'; -export { mergeSetRangeValues } from './services/clipboard/utils'; -export type { IAutoFillLocation } from './services/auto-fill/type'; -export type { IDiscreteRange } from './controllers/utils/range-tools'; -export { discreteRangeToRange, rangeToDiscreteRange, virtualizeDiscreteRanges } from './controllers/utils/range-tools'; export type { IHoverCellPosition, IHoverRichTextInfo, IHoverRichTextPosition } from './services/hover-manager.service'; -export { AFFECT_LAYOUT_STYLES, AutoHeightController } from './controllers/auto-height.controller'; -export { AutoWidthController } from './controllers/auto-width.controller'; -export { type IDragCellPosition } from './services/drag-manager.service'; -export { SheetMenuPosition } from './controllers/menu/menu'; -export { useHighlightRange } from './hooks/useHighlightRange'; -export { HeaderMoveRenderController } from './controllers/render-controllers/header-move.render-controller'; -export { HeaderResizeRenderController } from './controllers/render-controllers/header-resize.render-controller'; -export { HeaderFreezeRenderController } from './controllers/render-controllers/freeze.render-controller'; -export { FormulaEditorController } from './controllers/editor/formula-editor.controller'; -export { StatusBarController } from './controllers/status-bar.controller'; -export { SheetPermissionInterceptorBaseController } from './controllers/permission/sheet-permission-interceptor-base.controller'; +export { IMarkSelectionService, MarkSelectionService } from './services/mark-selection/mark-selection.service'; export { SheetPermissionUserManagerService } from './services/permission/sheet-permission-user-list.service'; -export type { IRangeProtectionRenderCellData } from './views/permission/extensions/range-protection.render'; -export { RenderSheetContent, RenderSheetFooter, RenderSheetHeader } from './views/sheet-container/SheetContainer'; -export { SheetBar } from './views/sheet-bar/SheetBar'; export { SheetPrintInterceptorService } from './services/print-interceptor.service'; -export { UniverSheetsMobileUIPlugin } from './mobile-plugin'; +export { SheetScrollManagerService } from './services/scroll-manager.service'; +export { BaseSelectionRenderService, genSelectionByRange, selectionDataForSelectAll as getAllSelection, getTopLeftSelectionOfCurrSheet, ISheetSelectionRenderService } from './services/selection/base-selection-render.service'; +export { genNormalSelectionStyle } from './services/selection/const'; +export { SelectionControl, SelectionControl as SelectionShape } from './services/selection/selection-control'; +export { SheetSelectionRenderService } from './services/selection/selection-render.service'; +export { SelectionShapeExtension } from './services/selection/selection-shape-extension'; +export { attachPrimaryWithCoord, attachRangeWithCoord, attachSelectionWithCoord } from './services/selection/util'; +export { SheetSkeletonManagerService } from './services/sheet-skeleton-manager.service'; +export type { ISheetSkeletonManagerParam } from './services/sheet-skeleton-manager.service'; +export { SheetsRenderService } from './services/sheets-render.service'; +export { calculateDocSkeletonRects, getCustomRangePosition, getEditingCustomRangePosition } from './services/utils/doc-skeleton-util'; export { MobileSheetBar } from './views/mobile/sheet-bar/MobileSheetBar'; -export { SheetPermissionInitController } from './controllers/permission/sheet-permission-init.controller'; -export { type IUniverSheetsUIConfig } from './controllers/config.schema'; +export type { IRangeProtectionRenderCellData } from './views/permission/extensions/range-protection.render'; +export { SheetBar } from './views/sheet-bar/SheetBar'; +export { RenderSheetContent, RenderSheetFooter, RenderSheetHeader } from './views/sheet-container/SheetContainer'; -export { FormatPainterStatus, IFormatPainterService } from './services/format-painter/format-painter.service'; -export type { IFormatPainterBeforeApplyHookParams, IFormatPainterHook } from './services/format-painter/format-painter.service'; -export { type IBaseSheetBarProps } from './views/sheet-bar/sheet-bar-tabs/SheetBarItem'; +export { getCellRealRange } from './common/utils'; export { FONT_FAMILY_COMPONENT, FONT_FAMILY_ITEM_COMPONENT } from './components/font-family/interface'; export { FONT_SIZE_COMPONENT } from './components/font-size/interface'; -export { SELECTION_SHAPE_DEPTH } from './services/selection/const'; -export { isRangeSelector, RANGE_SELECTOR_SYMBOLS } from './controllers/editor/utils/isRangeSelector'; export { EMBEDDING_FORMULA_EDITOR, isEmbeddingFormulaEditor } from './controllers/editor/utils/isEmbeddingFormulaEditor'; -export { SheetCellEditorResizeService } from './services/editor/cell-editor-resize.service'; +export { isRangeSelector, RANGE_SELECTOR_SYMBOLS } from './controllers/editor/utils/isRangeSelector'; export { menuSchema as SheetsUIMenuSchema } from './controllers/menu.schema'; -export { getCellRealRange } from './common/utils'; +export { SheetCellEditorResizeService } from './services/editor/cell-editor-resize.service'; +export { FormatPainterStatus, IFormatPainterService } from './services/format-painter/format-painter.service'; +export type { IFormatPainterBeforeApplyHookParams, IFormatPainterHook } from './services/format-painter/format-painter.service'; +export { SELECTION_SHAPE_DEPTH } from './services/selection/const'; +export { type IBaseSheetBarProps } from './views/sheet-bar/sheet-bar-tabs/SheetBarItem'; // #region - all commands export { AutoClearContentCommand, AutoFillCommand } from './commands/commands/auto-fill.command'; @@ -128,8 +120,7 @@ export { SheetPasteColWidthCommand, SheetPasteCommand, SheetPasteFormatCommand, - SheetPasteShortKeyCommand, - SheetPasteValueCommand, + SheetPasteShortKeyCommand, SheetPasteValueCommand, } from './commands/commands/clipboard.command'; export { DeleteRangeMoveLeftConfirmCommand } from './commands/commands/delete-range-move-left-confirm.command'; export { DeleteRangeMoveUpConfirmCommand } from './commands/commands/delete-range-move-up-confirm.command'; @@ -166,8 +157,7 @@ export { type IScrollCommandParams, type IScrollToCellCommandParams, type ISetScrollRelativeCommandParams, - ResetScrollCommand, - ScrollCommand, + ResetScrollCommand, ScrollCommand, ScrollToCellCommand, SetScrollRelativeCommand, } from './commands/commands/set-scroll.command'; @@ -190,5 +180,5 @@ export { SheetPermissionOpenDialogOperation } from './commands/operations/sheet- export { SheetPermissionOpenPanelOperation } from './commands/operations/sheet-permission-open-panel.operation'; export { SidebarDefinedNameOperation } from './commands/operations/sidebar-defined-name.operation'; export { UNIVER_SHEET_PERMISSION_BACKGROUND, UNIVER_SHEET_PERMISSION_USER_PART } from './consts/permission'; - +export type { IScrollState, IViewportScrollState } from './services/scroll-manager.service'; // #endregion diff --git a/packages/sheets/src/facade/f-worksheet.ts b/packages/sheets/src/facade/f-worksheet.ts index 5087b171414a..46103d95c8da 100644 --- a/packages/sheets/src/facade/f-worksheet.ts +++ b/packages/sheets/src/facade/f-worksheet.ts @@ -455,7 +455,7 @@ export class FWorksheet extends FBase { } /** - * Hides one or more consecutive rows starting at the given index. Use 0-index for this method. + * Hide one or more consecutive rows starting at the given index. Use 0-index for this method. * @param rowIndex The starting index of the rows to hide. * @param numRows The number of rows to hide. * @returns This sheet, for chaining. @@ -480,7 +480,7 @@ export class FWorksheet extends FBase { } /** - * Un hides the row in the given range. + * Unhide the row in the given range. * @param row The range to unhide, if hidden. * @returns This sheet, for chaining. */ @@ -499,7 +499,7 @@ export class FWorksheet extends FBase { } /** - * Unhides one or more consecutive rows starting at the given index. Use 0-index for this method. + * Unhide one or more consecutive rows starting at the given index. Use 0-index for this method. * @param rowIndex The starting index of the rows to unhide. * @param numRows The number of rows to unhide. * @returns This sheet, for chaining. @@ -868,7 +868,7 @@ export class FWorksheet extends FBase { } /** - * Un hides one or more consecutive columns starting at the given index. Use 0-index for this method. + * Unhide one or more consecutive columns starting at the given index. Use 0-index for this method. * @param columnIndex The starting index of the columns to unhide. * @param numColumns The number of columns to unhide. * @returns This sheet, for chaining. @@ -1109,9 +1109,9 @@ export class FWorksheet extends FBase { } /** - * Set freeze column, then the column range in startColumn to endColumn will be fixed. - * e.g. freezeColumn(0, 2) will fix the column range at 0 to 2. - * e.g. freezeColumn(2, 3) will fix the column range at 2 to 3, And column at 0 to 1 will be invisible. + * Set freeze column, then the range from startColumn to endColumn will be fixed. + * e.g. freezeColumn(0, 2) will fix the column range from 0 to 2. + * e.g. freezeColumn(2, 3) will fix the column range from 2 to 3, And column from 0 to 1 will be invisible. * * @example * ``` ts @@ -1136,9 +1136,9 @@ export class FWorksheet extends FBase { } /** - * Set freeze row, then the range in startRow to endRow will be fixed. - * e.g. freezeRow(0, 2) will fix the row range at 0 to 2. - * e.g. freezeRow(2, 3) will fix the row range at 2 to 3, And row at 0 to 1 will be invisible. + * Set freeze row, then the range from startRow to endRow will be fixed. + * e.g. freezeRow(0, 2) will fix the row range from 0 to 2. + * e.g. freezeRow(2, 3) will fix the row range from 2 to 3, And row from 0 to 1 will be invisible. * @param startRow * @param endRow *