@univerjscoreclassesStyles

@univerjs/core v0.5.4


Class: Styles

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/sheets/styles.ts:26

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

Constructors

new Styles()

new Styles(styles): Styles

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

Parameters

ParameterType
stylesIKeyType<Nullable<IStyleData>>

Returns

Styles

Methods

add()

add(data, styleObject): string

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

Parameters

ParameterType
dataIStyleData
styleObjectstring

Returns

string


each()

each(callback): Styles

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

Parameters

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

Returns

Styles


get()

get(id): Nullable<IStyleData>

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

Parameters

ParameterType
id| string | Nullable<IStyleData>

Returns

Nullable<IStyleData>


getStyleByCell()

getStyleByCell(cell): Nullable<IStyleData>

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

Parameters

ParameterType
cellNullable<ICellDataForSheetInterceptor>

Returns

Nullable<IStyleData>


search(data, styleObject): string

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

Parameters

ParameterType
dataIStyleData
styleObjectstring

Returns

string


setValue()

setValue(data): Nullable<string>

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

Parameters

ParameterType
dataNullable<IStyleData>

Returns

Nullable<string>


toJSON()

toJSON(): IKeyType<Nullable<IStyleData>>

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

Returns

IKeyType<Nullable<IStyleData>>