@univerjs/core v0.5.0-beta.1 • 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. |
Returns
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:85
Methods
__getInjector()
__getInjector(): Injector
Returns
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:97
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
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:109
createUniverDoc()
createUniverDoc(data): DocumentDataModel
Parameters
Parameter | Type |
---|---|
data | Partial <IDocumentData > |
Returns
Deprecated
use createUnit
instead
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:126
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
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:118
createUniverSlide()
createUniverSlide(data): SlideDataModel
Parameters
Parameter | Type |
---|---|
data | Partial <ISlideData > |
Returns
Deprecated
use createUnit
instead
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:134
dispose()
dispose(): void
Returns
void
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:101
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
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:174
setLocale()
setLocale(locale): void
Parameters
Parameter | Type |
---|---|
locale | LocaleType |
Returns
void
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:105