Class: FSheetEventName
Defined in: submodules/univer/packages/sheets/src/facade/f-event.ts:86
Extends
Implements
Constructors
new FSheetEventName()
new FSheetEventName(): FSheetEventName
Defined in: submodules/univer/packages/core/src/facade/f-event.ts:114
Returns
Inherited from
Properties
Property | Modifier | Type | Inherited from | Defined in |
---|---|---|---|---|
_instance | static | null | FEventName | FEventName ._instance | submodules/univer/packages/core/src/facade/f-event.ts:87 |
Accessors
BeforeCommandExecute
Get Signature
get BeforeCommandExecute(): "BeforeCommandExecute"
Defined in: submodules/univer/packages/core/src/facade/f-event.ts:252
Event fired before a command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.BeforeCommandExecute, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"BeforeCommandExecute"
Inherited from
FEventName
.BeforeCommandExecute
BeforeRedo
Get Signature
get BeforeRedo(): "BeforeRedo"
Defined in: submodules/univer/packages/core/src/facade/f-event.ts:207
Event fired before a redo command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.BeforeRedo, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"BeforeRedo"
Inherited from
BeforeSheetCreate
Get Signature
get BeforeSheetCreate(): "BeforeSheetCreate"
Defined in: submodules/univer/packages/sheets/src/facade/f-event.ts:91
Event fired before a sheet is created
See
Example
univerAPI.addEvent(univerAPI.event.BeforeSheetCreate, (params) => {
const { workbook, index, sheet } = params;
console.log('unit created', params);
});
Returns
"BeforeSheetCreate"
Implementation of
IFSheetEventMixin
.BeforeSheetCreate
Overrides
FEventName.BeforeSheetCreate
BeforeUndo
Get Signature
get BeforeUndo(): "BeforeUndo"
Defined in: submodules/univer/packages/core/src/facade/f-event.ts:222
Event fired before an undo command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.BeforeUndo, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"BeforeUndo"
Inherited from
CommandExecuted
Get Signature
get CommandExecuted(): "CommandExecuted"
Defined in: submodules/univer/packages/core/src/facade/f-event.ts:237
Event fired when a command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.CommandExecuted, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"CommandExecuted"
Inherited from
DocCreated
Get Signature
get DocCreated(): "DocCreated"
Defined in: submodules/univer/packages/core/src/facade/f-event.ts:132
Event fired when a document is created
See
IDocCreatedParam
Example
univerAPI.addEvent(univerAPI.event.DocCreated, (params) => {
const { unitId, type, doc, unit } = params;
console.log('doc created', params);
});
Returns
"DocCreated"
Inherited from
DocDisposed
Get Signature
get DocDisposed(): "DocDisposed"
Defined in: submodules/univer/packages/core/src/facade/f-event.ts:147
Event fired when a document is disposed
See
IDocDisposedEvent
Example
univerAPI.addEvent(univerAPI.event.DocDisposed, (params) => {
const { unitId, unitType, snapshot } = params;
console.log('doc disposed', params);
});
Returns
"DocDisposed"
Inherited from
LifeCycleChanged
Get Signature
get LifeCycleChanged(): "LifeCycleChanged"
Defined in: submodules/univer/packages/core/src/facade/f-event.ts:162
Event fired when life cycle is changed
See
ILifeCycleChangedEvent
Example
univerAPI.addEvent(univerAPI.event.LifeCycleChanged, (params) => {
const { stage } = params;
console.log('life cycle changed', params);
});
Returns
"LifeCycleChanged"
Inherited from
Redo
Get Signature
get Redo(): "Redo"
Defined in: submodules/univer/packages/core/src/facade/f-event.ts:177
Event fired when a redo command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.Redo, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"Redo"
Inherited from
SheetCreated
Get Signature
get SheetCreated(): "SheetCreated"
Defined in: submodules/univer/packages/sheets/src/facade/f-event.ts:87
Event fired after a sheet is created
See
Example
univerAPI.addEvent(univerAPI.event.SheetCreated, (params) => {
const { workbook, worksheet } = params;
console.log('unit created', params);
});
Returns
"SheetCreated"
Implementation of
IFSheetEventMixin
.SheetCreated
Overrides
FEventName.SheetCreated
Undo
Get Signature
get Undo(): "Undo"
Defined in: submodules/univer/packages/core/src/facade/f-event.ts:192
Event fired when an undo command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.Undo, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"Undo"
Inherited from
WorkbookCreated
Get Signature
get WorkbookCreated(): "WorkbookCreated"
Defined in: submodules/univer/packages/sheets/src/facade/f-event.ts:95
Event fired after a workbook is created
See
Example
univerAPI.addEvent(univerAPI.event.WorkbookCreated, (params) => {
const { unitId, type, workbook, unit } = params;
console.log('unit created', params);
});
Returns
"WorkbookCreated"
Implementation of
IFSheetEventMixin
.WorkbookCreated
Overrides
FEventName.WorkbookCreated
WorkbookDisposed
Get Signature
get WorkbookDisposed(): "WorkbookDisposed"
Defined in: submodules/univer/packages/sheets/src/facade/f-event.ts:99
Event fired after a workbook is disposed
See
Example
univerAPI.addEvent(univerAPI.event.WorkbookDisposed, (params) => {
const { unitId, unitType, snapshot } = params;
console.log('unit disposed', params);
});
Returns
"WorkbookDisposed"
Implementation of
IFSheetEventMixin
.WorkbookDisposed
Overrides
FEventName.WorkbookDisposed
Methods
extend()
static extend(source): void
Defined in: submodules/univer/packages/core/src/facade/f-event.ts:98
Parameters
Parameter | Type |
---|---|
source | any |
Returns
void
Inherited from
get()
static get(): FEventName
Defined in: submodules/univer/packages/core/src/facade/f-event.ts:88