API 參考

WrapStrategy

此 API 頁面目前提供英文內容。程式碼簽名與識別符不隨介面語言變更。

How cell text behaves when it exceeds the available width. Use these values with FRange.setWrapStrategy.

Import

TypeScript
import { WrapStrategy } from '@univerjs/core'

Definition

TypeScript
enum WrapStrategy {  UNSPECIFIED = 0,  OVERFLOW = 1,  CLIP = 2,  WRAP = 3,}

Values

  • OVERFLOW — Lines that are longer than the cell width will be written in the next cell over, so long as that cell is empty. If the next cell over is non-empty, this behaves the same as CLIP . The text will never wrap to the next line unless the user manually inserts a new line.
  • CLIP — Lines that are longer than the cell width will be clipped. The text will never wrap to the next line unless the user manually inserts a new line.
  • WRAP — Words that are longer than a line are wrapped at the character level rather than clipped.

Package: @univerjs/core · Type definitions

你覺得這篇文檔如何?

© 2026 DreamNum Co., Ltd.