Справочник API

Common sub-types

Shared composite types referenced across multiple Univer data models.

Текст этой страницы API пока доступен на английском. Сигнатуры и идентификаторы не зависят от языка интерфейса.

Shared composite types referenced across multiple Univer data models. Supporting IWorkbookData, IDocumentData, ISlideData, IBoardData. Types are ordered from direct top-level fields to deeper nested structures and enums.

Overview

BaselineOffset

import { BaselineOffset } from '@univerjs/core' · Used by IStyleData · ITextStyle · IStyleBase

TypeScript
enum BaselineOffset {  NORMAL = 1,  SUBSCRIPT = 2,  SUPERSCRIPT = 3,}

IBorderData

import type { IBorderData } from '@univerjs/core' · Used by IStyleData · ITextStyle · IStyleBase

Style properties of top, bottom, left and right border

TLBR = 'tlbr', //START_TOP_LEFT_END_BOTTOM_RIGHT TLBC = 'tlbc', // START_TOP_LEFT_END_BOTTOM_CENTER

TLMR = 'tlmr', // START_TOP_LEFT_END_MIDDLE_RIGHT

BLTR = 'bltr', // START_BOTTOM_LEFT_END_TOP_RIGHT

MLTR = 'mltr', // START_MIDDLE_LEFT_END_TOP_RIGHT

BCTR = 'bctr', // START_BOTTOM_CENTER_END_TOP_RIGHT

TypeScript
interface IBorderData {  t?: Nullable<IBorderStyleData>  r?: Nullable<IBorderStyleData>  b?: Nullable<IBorderStyleData>  l?: Nullable<IBorderStyleData>  tl_br?: Nullable<IBorderStyleData>  tl_bc?: Nullable<IBorderStyleData>  tl_mr?: Nullable<IBorderStyleData>  bl_tr?: Nullable<IBorderStyleData>  ml_tr?: Nullable<IBorderStyleData>  bc_tr?: Nullable<IBorderStyleData>}

Related types: IBorderStyleData · Nullable

IColorStyle

import type { IColorStyle } from '@univerjs/core' · Used by IStyleData · ITextStyle · IStyleBase · ITextDecoration · IBorderStyleData · IDocumentRenderConfig · IPageBorder · ITableCell · ITableCellBorder · IShading · IDocsBorder

RGB color or theme color

TypeScript
interface IColorStyle {  rgb?: Nullable<string>  th?: ThemeColorType}

Related types: Nullable · ThemeColorType

IGlowEffect

import type { IGlowEffect } from '@univerjs/core' · Used by ITextStyle · ISlideGroupElement · ISlideEffectStyle · IBasicShapeData · IBoardEffectStyle

Glow applied around drawing content.

Dimensional values use the owning unit's drawing coordinate system.

TypeScript
interface IGlowEffect {  color: string  radius?: number}

IResources

import type { IResources } from '@univerjs/core' · Used by IWorkbookData · IDocumentData · IBaseSnapshot · ISlideData · IBoardData

TypeScript
type IResources = Array<{ id?: string; name: string; data: string }>

IShadowEffect

import type { IShadowEffect } from '@univerjs/core' · Used by ITextStyle · ISlideGroupElement · ISlideEffectStyle · IBasicShapeData · IBoardEffectStyle

Outer shadow applied to drawing content.

Dimensional values use the owning unit's drawing coordinate system.

TypeScript
interface IShadowEffect {  color: string  preset?: string  opacity?: number  blurRadius?: number  direction?: number  distance?: number  sx?: number  sy?: number  skewX?: number  skewY?: number  alignment?: OuterShadowAlignment  rotateWithShape?: boolean}

Related types: OuterShadowAlignment

IStyleBase

import type { IStyleBase } from '@univerjs/core' · Used by IStyleData · ITextStyle

Basics properties of cell style

TypeScript
interface IStyleBase {  ff?: Nullable<string>  eastAsiaFontFamily?: Nullable<string>  fs?: number  it?: BooleanNumber  bl?: BooleanNumber  ul?: ITextDecoration  bbl?: ITextDecoration  st?: ITextDecoration  ol?: ITextDecoration  bg?: Nullable<IColorStyle>  bd?: Nullable<IBorderData>  cl?: Nullable<IColorStyle>  va?: Nullable<BaselineOffset>  n?: Nullable<{ pattern: string }>}

Related types: Nullable · BooleanNumber · ITextDecoration · IColorStyle · IBorderData · BaselineOffset

ITextDecoration

import type { ITextDecoration } from '@univerjs/core' · Used by IStyleData · ITextStyle · IStyleBase

Properties of text decoration

TypeScript
interface ITextDecoration {  s: BooleanNumber  c?: BooleanNumber  cl?: IColorStyle  t?: TextDecoration}

Related types: BooleanNumber · IColorStyle · TextDecoration

Nullable

import type { Nullable } from '@univerjs/core' · Used by ICellData · IStyleData · IWorkbookData · IWorksheetData · ITextStyle · CustomData · IStyleBase · IColorStyle · IBorderData · IRowData · IColumnData · IDrawingParam

TypeScript
type Nullable<T> = T | null | undefined | void

TextDirection

import { TextDirection } from '@univerjs/core' · Used by IStyleData · ISectionBreakBase · IParagraphProperties

An enum that specifies the text direction of a cell.

TypeScript
enum TextDirection {  UNSPECIFIED = 0,  LEFT_TO_RIGHT = 1,  RIGHT_TO_LEFT = 2,}

IBorderStyleData

import type { IBorderStyleData } from '@univerjs/core' · Used by IBorderData

Style properties of border

TypeScript
interface IBorderStyleData {  s: BorderStyleTypes  cl: IColorStyle}

Related types: BorderStyleTypes · IColorStyle

ImageSourceType

import { ImageSourceType } from '@univerjs/core' · Used by IWorksheetBackgroundImage · IDocTextFill · IDocumentBackground · ISlideImageBackground · ISlideImageElement · IPdfEditorManagedImageResource · IPdfUniverserResourceBinding · IBoardImageBackground · IBoardImageElement · ImageSourceTypeEnum

The type of image data source

TypeScript
enum ImageSourceType {  URL = 'URL',  UUID = 'UUID',  BASE64 = 'BASE64',}

TextDecoration

import { TextDecoration } from '@univerjs/core' · Used by ITextDecoration

Types of text decoration

TypeScript
enum TextDecoration {  DASH = 0,  DASH_DOT_DOT_HEAVY = 1,  DASH_DOT_HEAVY = 2,  DASHED_HEAVY = 3,  DASH_LONG = 4,  DASH_LONG_HEAVY = 5,  DOT_DASH = 6,  DOT_DOT_DASH = 7,  DOTTED = 8,  DOTTED_HEAVY = 9,  DOUBLE = 10,  NONE = 11,  SINGLE = 12,  THICK = 13,  WAVE = 14,  WAVY_DOUBLE = 15,  WAVY_HEAVY = 16,  WORDS = 17,  SINGLE_ACCOUNTING = 18,  DOUBLE_ACCOUNTING = 19,}

ThemeColorType

import { ThemeColorType } from '@univerjs/core' · Used by IColorStyle

Theme color type enum

TypeScript
enum ThemeColorType {  DARK1 = 0,  LIGHT1 = 1,  DARK2 = 2,  LIGHT2 = 3,  ACCENT1 = 4,  ACCENT2 = 5,  ACCENT3 = 6,  ACCENT4 = 7,  ACCENT5 = 8,  ACCENT6 = 9,  HYPERLINK = 10,  FOLLOWED_HYPERLINK = 11,}

Насколько полезно это руководство?

© 2026 DreamNum Co., Ltd.