mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-14 21:12:53 +00:00
Update command.md
This commit is contained in:
parent
bd85ca3ca6
commit
1e72c43459
@ -25,8 +25,7 @@ sidebar_position: 10
|
||||
|
||||
注册一个新命令及其处理函数。
|
||||
|
||||
```
|
||||
typescriptCopy code
|
||||
```typescript
|
||||
/**
|
||||
* 注册一个新的命令及其处理程序。
|
||||
* @param command {IPublicTypeCommand} - 要注册的命令。
|
||||
@ -38,8 +37,7 @@ registerCommand(command: IPublicTypeCommand): void;
|
||||
|
||||
注销一个已存在的命令。
|
||||
|
||||
```
|
||||
typescriptCopy code
|
||||
```typescript
|
||||
/**
|
||||
* 注销一个已存在的命令。
|
||||
* @param name {string} - 要注销的命令的名称。
|
||||
@ -51,8 +49,7 @@ unregisterCommand(name: string): void;
|
||||
|
||||
根据名称和提供的参数执行命令,确保参数符合命令的定义。
|
||||
|
||||
```
|
||||
typescriptCopy code
|
||||
```typescript
|
||||
/**
|
||||
* 根据名称和提供的参数执行命令。
|
||||
* @param name {string} - 要执行的命令的名称。
|
||||
@ -65,8 +62,7 @@ executeCommand(name: string, args?: IPublicTypeCommandHandlerArgs): void;
|
||||
|
||||
批量执行命令,在所有命令执行后进行重绘,历史记录中只记录一次。
|
||||
|
||||
```
|
||||
typescriptCopy code
|
||||
```typescript
|
||||
/**
|
||||
* 批量执行命令,随后进行重绘,历史记录中只记录一次。
|
||||
* @param commands {Array} - 命令对象的数组,包含名称和可选参数。
|
||||
@ -78,8 +74,7 @@ batchExecuteCommand(commands: { name: string; args?: IPublicTypeCommandHandlerAr
|
||||
|
||||
列出所有已注册的命令。
|
||||
|
||||
```
|
||||
typescriptCopy code
|
||||
```typescript
|
||||
/**
|
||||
* 列出所有已注册的命令。
|
||||
* @returns {IPublicTypeListCommand[]} - 已注册命令的数组。
|
||||
@ -91,8 +86,7 @@ listCommands(): IPublicTypeListCommand[];
|
||||
|
||||
为命令执行过程中的错误注册错误处理回调函数。
|
||||
|
||||
```
|
||||
typescriptCopy code
|
||||
```typescript
|
||||
/**
|
||||
* 为命令执行过程中的错误注册一个回调函数。
|
||||
* @param callback {(name: string, error: Error) => void} - 错误处理的回调函数。
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user