@univerjscoreclassesStyles

@univerjs/core v0.5.0-beta.1Docs


Class: Styles

Styles in a workbook, cells locate styles based on style IDs

Constructors

new Styles()

new Styles(styles): Styles

Parameters

ParameterType
stylesIKeyType<Nullable<IStyleData>>

Returns

Styles

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/sheets/styles.ts:31

Methods

add()

add(data, styleObject): string

Parameters

ParameterType
dataIStyleData
styleObjectstring

Returns

string

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/sheets/styles.ts:70


each()

each(callback): Styles

Parameters

ParameterType
callback(value, index, array) => void

Returns

Styles

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/sheets/styles.ts:37


get()

get(id): Nullable<IStyleData>

Parameters

ParameterType
idstring | Nullable<IStyleData>

Returns

Nullable<IStyleData>

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/sheets/styles.ts:63


getStyleByCell()

getStyleByCell(cell): Nullable<IStyleData>

Parameters

ParameterType
cellNullable<ICellDataForSheetInterceptor>

Returns

Nullable<IStyleData>

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/sheets/styles.ts:93


search(data, styleObject): string

Parameters

ParameterType
dataIStyleData
styleObjectstring

Returns

string

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/sheets/styles.ts:48


setValue()

setValue(data): Nullable<string>

Parameters

ParameterType
dataNullable<IStyleData>

Returns

Nullable<string>

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/sheets/styles.ts:79


toJSON()

toJSON(): IKeyType<Nullable<IStyleData>>

Returns

IKeyType<Nullable<IStyleData>>

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/sheets/styles.ts:89