API Reference
@univerjs
@univerjs/core
classes
Styles

@univerjs/core v0.4.2Docs


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

submodules/univer/packages/core/src/sheets/styles.ts:31 (opens in a new tab)

Methods

add()

add(data, styleObject): string

Parameters

ParameterType
dataIStyleData
styleObjectstring

Returns

string

Defined in

submodules/univer/packages/core/src/sheets/styles.ts:70 (opens in a new tab)


each()

each(callback): Styles

Parameters

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

Returns

Styles

Defined in

submodules/univer/packages/core/src/sheets/styles.ts:37 (opens in a new tab)


get()

get(id): Nullable<IStyleData>

Parameters

ParameterType
idstring | Nullable<IStyleData>

Returns

Nullable<IStyleData>

Defined in

submodules/univer/packages/core/src/sheets/styles.ts:63 (opens in a new tab)


getStyleByCell()

getStyleByCell(cell): Nullable<IStyleData>

Parameters

ParameterType
cellNullable<ICellDataForSheetInterceptor>

Returns

Nullable<IStyleData>

Defined in

submodules/univer/packages/core/src/sheets/styles.ts:93 (opens in a new tab)


search()

search(data, styleObject): string

Parameters

ParameterType
dataIStyleData
styleObjectstring

Returns

string

Defined in

submodules/univer/packages/core/src/sheets/styles.ts:48 (opens in a new tab)


setValue()

setValue(data): Nullable<string>

Parameters

ParameterType
dataNullable<IStyleData>

Returns

Nullable<string>

Defined in

submodules/univer/packages/core/src/sheets/styles.ts:79 (opens in a new tab)


toJSON()

toJSON(): IKeyType<Nullable<IStyleData>>

Returns

IKeyType<Nullable<IStyleData>>

Defined in

submodules/univer/packages/core/src/sheets/styles.ts:89 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.