@univerjscoreclassesSlidedatamodel

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


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

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:52

Properties

PropertyModifierTypeDefault valueOverridesInherited fromDefined in
_disposedprotectedbooleanfalse-UnitModel._disposedpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:93
activePage$readonlyObservable<Nullable<ISlidePage>>undefined--packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:43
name$publicObservable<string>undefinedUnitModel.name$-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:46
typepublicUNIVER_SLIDEUniverInstanceType.UNIVER_SLIDEUnitModel.type-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:26

Methods

appendPage()

appendPage(page): void

Parameters

ParameterType
pageISlidePage

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:145


dispose()

dispose(): void

Returns

void

Inherited from

UnitModel.dispose

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:106


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

UnitModel.disposeWithMe

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

UnitModel.ensureNotDisposed

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:100


getActivePage()

getActivePage(): Nullable<ISlidePage>

Returns

Nullable<ISlidePage>

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:135


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
descriptionstringpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:121
idstring-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:117
pageBackgroundFill{ rgb: 'rgb(255,255,255)'; }-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:122
pageBackgroundFill.rgbstring’rgb(255,255,255)‘packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:123
pageElements{}{}packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:125
pageTypePageTypePageType.SLIDEpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:118
titlestringidpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:120
zIndexnumber10packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:119

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:113


getElement()

getElement(pageId, elementId): undefined | IPageElement

Parameters

ParameterType
pageIdstring
elementIdstring

Returns

undefined | IPageElement

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:105


getElementsByPage()

getElementsByPage(pageId): undefined | {}

Parameters

ParameterType
pageIdstring

Returns

undefined | {}

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:101


getPage()

getPage(pageId): undefined | ISlidePage

Parameters

ParameterType
pageIdstring

Returns

undefined | ISlidePage

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:96


getPageOrder()

getPageOrder(): undefined | string[]

Returns

undefined | string[]

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:92


getPages()

getPages(): undefined | {}

Returns

undefined | {}

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:88


getPageSize()

getPageSize(): ISize

Returns

ISize

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:109


getRev()

getRev(): number

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

Returns

number

Overrides

UnitModel.getRev

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:68


getSnapshot()

getSnapshot(): ISlideData

Returns

ISlideData

Overrides

UnitModel.getSnapshot

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:80


getUnitId()

getUnitId(): string

Returns

string

Overrides

UnitModel.getUnitId

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:84


incrementRev()

incrementRev(): void

Increment the current revision.

Returns

void

Overrides

UnitModel.incrementRev

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:72


setActivePage()

setActivePage(page): void

Parameters

ParameterType
pageNullable<ISlidePage>

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:131


setName()

setName(name): void

Parameters

ParameterType
namestring

Returns

void

Overrides

UnitModel.setName

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:62


setRev()

setRev(_rev): void

Set revision of the current snapshot.

Parameters

ParameterType
_revnumber

Returns

void

Overrides

UnitModel.setRev

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:76


updatePage()

updatePage(pageId, page): void

Parameters

ParameterType
pageIdstring
pageISlidePage

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:139