@univerjs/core v0.5.0-beta.1 • Docs
Enumeration: CommandType
The type of a command.
Enumeration Members
Enumeration Member | Value | Description | Defined in |
---|---|---|---|
COMMAND | 0 | Responsible for creating, orchestrating, and executing MUTATION or OPERATION according to specific business logic. For example, a delete row COMMAND will generate a delete row MUTATION, an insert row MUTATION for undo, and a set cell content MUTATION. | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/command/command.service.ts:37 |
MUTATION | 2 | MUTATION is the change made to the data saved to snapshot, such as inserting rows and columns, modifying cell content, modifying filter ranges, etc. If you want to add collaborative editing capabilities to Univer, it is the smallest unit of conflict resolution. | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/command/command.service.ts:48 |
OPERATION | 1 | OPERATION is the change made to data that is not saved to snapshot, without conflict resolution, such as modifying scroll position, modifying sidebar state, etc. | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/command/command.service.ts:42 |