@univerjs/core v0.4.2 • Docs
Class: Univer
Constructors
new Univer()
new Univer(config, parentInjector?): Univer
Create a Univer instance.
Parameters
Parameter | Type | Description |
---|---|---|
config | Partial <IUniverConfig > | Configuration data for Univer |
parentInjector ? | Injector | An optional parent injector of the Univer injector. For more information, see https://redi.wendell.fun/docs/hierarchy (opens in a new tab). |
Returns
Defined in
submodules/univer/packages/core/src/univer.ts:83 (opens in a new tab)
Methods
__getInjector()
__getInjector(): Injector
Returns
Defined in
submodules/univer/packages/core/src/univer.ts:95 (opens in a new tab)
createUnit()
createUnit<T, U>(type, data): U
Type Parameters
Type Parameter |
---|
T |
U extends UnitModel <object , number > |
Parameters
Parameter | Type |
---|---|
type | number |
data | Partial <T > |
Returns
U
Defined in
submodules/univer/packages/core/src/univer.ts:107 (opens in a new tab)
createUniverDoc()
createUniverDoc(data): DocumentDataModel
Parameters
Parameter | Type |
---|---|
data | Partial <IDocumentData > |
Returns
Deprecated
use createUnit
instead
Defined in
submodules/univer/packages/core/src/univer.ts:124 (opens in a new tab)
createUniverSheet()
createUniverSheet(data): Workbook
Create a univer sheet instance with internal dependency injection.
Parameters
Parameter | Type |
---|---|
data | Partial <IWorkbookData > |
Returns
Deprecated
use createUnit
instead
Defined in
submodules/univer/packages/core/src/univer.ts:116 (opens in a new tab)
createUniverSlide()
createUniverSlide(data): SlideDataModel
Parameters
Parameter | Type |
---|---|
data | Partial <ISlideData > |
Returns
Deprecated
use createUnit
instead
Defined in
submodules/univer/packages/core/src/univer.ts:132 (opens in a new tab)
dispose()
dispose(): void
Returns
void
Defined in
submodules/univer/packages/core/src/univer.ts:99 (opens in a new tab)
registerPlugin()
registerPlugin<T>(plugin, config?): void
Register a plugin into univer.
Type Parameters
Type Parameter |
---|
T extends PluginCtor <Plugin > |
Parameters
Parameter | Type |
---|---|
plugin | T |
config ? | ConstructorParameters <T >[0 ] |
Returns
void
Defined in
submodules/univer/packages/core/src/univer.ts:172 (opens in a new tab)
setLocale()
setLocale(locale): void
Parameters
Parameter | Type |
---|---|
locale | LocaleType |
Returns
void
Defined in
submodules/univer/packages/core/src/univer.ts:103 (opens in a new tab)