API Reference
@univerjs
@univerjs/core
classes
Slidedatamodel

@univerjs/core v0.4.2Docs


Class: SlideDataModel

The base class for all units.

Extends

Constructors

new SlideDataModel()

new SlideDataModel(snapshot): SlideDataModel

Parameters

ParameterType
snapshotPartial<ISlideData>

Returns

SlideDataModel

Overrides

UnitModel.constructor

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:52 (opens in a new tab)

Properties

PropertyModifierTypeDefault valueOverridesInherited fromDefined in
_disposedprotectedbooleanfalse-UnitModel._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93 (opens in a new tab)
activePage$readonlyObservable<Nullable<ISlidePage>>undefined--submodules/univer/packages/core/src/slides/slide-model.ts:43 (opens in a new tab)
name$publicObservable<string>undefinedUnitModel.name$-submodules/univer/packages/core/src/slides/slide-model.ts:46 (opens in a new tab)
typepublicUNIVER_SLIDEUniverInstanceType.UNIVER_SLIDEUnitModel.type-submodules/univer/packages/core/src/slides/slide-model.ts:26 (opens in a new tab)

Methods

appendPage()

appendPage(page): void

Parameters

ParameterType
pageISlidePage

Returns

void

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:145 (opens in a new tab)


dispose()

dispose(): void

Returns

void

Inherited from

UnitModel.dispose

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:106 (opens in a new tab)


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

UnitModel.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

UnitModel.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)


getActivePage()

getActivePage(): Nullable<ISlidePage>

Returns

Nullable<ISlidePage>

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:135 (opens in a new tab)


getBlankPage()

getBlankPage(): {
  description: '';
  id: string;
  pageBackgroundFill: {
     rgb: 'rgb(255,255,255)';
    };
  pageElements: {};
  pageType: PageType.SLIDE;
  title: id;
  zIndex: 10;
}

Returns

{
  description: '';
  id: string;
  pageBackgroundFill: {
     rgb: 'rgb(255,255,255)';
    };
  pageElements: {};
  pageType: PageType.SLIDE;
  title: id;
  zIndex: 10;
}
NameTypeDefault valueDefined in
descriptionstring''submodules/univer/packages/core/src/slides/slide-model.ts:121 (opens in a new tab)
idstring-submodules/univer/packages/core/src/slides/slide-model.ts:117 (opens in a new tab)
pageBackgroundFill{ rgb: 'rgb(255,255,255)'; }-submodules/univer/packages/core/src/slides/slide-model.ts:122 (opens in a new tab)
pageBackgroundFill.rgbstring'rgb(255,255,255)'submodules/univer/packages/core/src/slides/slide-model.ts:123 (opens in a new tab)
pageElements{}{}submodules/univer/packages/core/src/slides/slide-model.ts:125 (opens in a new tab)
pageTypePageTypePageType.SLIDEsubmodules/univer/packages/core/src/slides/slide-model.ts:118 (opens in a new tab)
titlestringidsubmodules/univer/packages/core/src/slides/slide-model.ts:120 (opens in a new tab)
zIndexnumber10submodules/univer/packages/core/src/slides/slide-model.ts:119 (opens in a new tab)

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:113 (opens in a new tab)


getElement()

getElement(pageId, elementId): undefined | IPageElement

Parameters

ParameterType
pageIdstring
elementIdstring

Returns

undefined | IPageElement

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:105 (opens in a new tab)


getElementsByPage()

getElementsByPage(pageId): undefined | {}

Parameters

ParameterType
pageIdstring

Returns

undefined | {}

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:101 (opens in a new tab)


getPage()

getPage(pageId): undefined | ISlidePage

Parameters

ParameterType
pageIdstring

Returns

undefined | ISlidePage

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:96 (opens in a new tab)


getPageOrder()

getPageOrder(): undefined | string[]

Returns

undefined | string[]

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:92 (opens in a new tab)


getPageSize()

getPageSize(): ISize

Returns

ISize

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:109 (opens in a new tab)


getPages()

getPages(): undefined | {}

Returns

undefined | {}

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:88 (opens in a new tab)


getRev()

getRev(): number

Get revision of the unit's snapshot. Note that revision should start from 1.

Returns

number

Overrides

UnitModel.getRev

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:68 (opens in a new tab)


getSnapshot()

getSnapshot(): ISlideData

Returns

ISlideData

Overrides

UnitModel.getSnapshot

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:80 (opens in a new tab)


getUnitId()

getUnitId(): string

Returns

string

Overrides

UnitModel.getUnitId

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:84 (opens in a new tab)


incrementRev()

incrementRev(): void

Increment the current revision.

Returns

void

Overrides

UnitModel.incrementRev

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:72 (opens in a new tab)


setActivePage()

setActivePage(page): void

Parameters

ParameterType
pageNullable<ISlidePage>

Returns

void

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:131 (opens in a new tab)


setName()

setName(name): void

Parameters

ParameterType
namestring

Returns

void

Overrides

UnitModel.setName

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:62 (opens in a new tab)


setRev()

setRev(_rev): void

Set revision of the current snapshot.

Parameters

ParameterType
_revnumber

Returns

void

Overrides

UnitModel.setRev

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:76 (opens in a new tab)


updatePage()

updatePage(pageId, page): void

Parameters

ParameterType
pageIdstring
pageISlidePage

Returns

void

Defined in

submodules/univer/packages/core/src/slides/slide-model.ts:139 (opens in a new tab)


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