API Reference
@univerjs
@univerjs/core
enumerations
Commandtype

@univerjs/core v0.4.2Docs


Enumeration: CommandType

The type of a command.

Enumeration Members

Enumeration MemberValueDescriptionDefined in
COMMAND0Responsible 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.submodules/univer/packages/core/src/services/command/command.service.ts:37 (opens in a new tab)
MUTATION2OPERATION is the change made to data that is not saved to snapshot, without conflict resolution, such as modifying scroll position, modifying sidebar state, etc.submodules/univer/packages/core/src/services/command/command.service.ts:48 (opens in a new tab)
OPERATION1MUTATION 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.submodules/univer/packages/core/src/services/command/command.service.ts:43 (opens in a new tab)

Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.