File tree Expand file tree Collapse file tree 18 files changed +118
-17
lines changed
Expand file tree Collapse file tree 18 files changed +118
-17
lines changed Original file line number Diff line number Diff line change 11---
22title : canvas - 画布 API
3- sidebar_position : 12
3+ sidebar_position : 10
44---
55
66> ** @types ** [ IPublicApiCanvas] ( https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/canvas.ts ) <br />
Original file line number Diff line number Diff line change 1+ ---
2+ title : command - 指令 API
3+ sidebar_position : 10
4+ ---
5+
6+
7+
8+ ## 模块概览
9+
10+ 该模块使得与命令系统的交互成为可能,提供了一种全面的方式来处理、执行和管理应用程序中的命令。
11+
12+
13+
14+ ## 接口
15+
16+ ### IPublicApiCommand
17+
18+ 与命令交互的接口。它提供了注册、注销、执行和管理命令的方法。
19+
20+
21+
22+ ## 方法
23+
24+ ### registerCommand
25+
26+ 注册一个新命令及其处理函数。
27+
28+ ```
29+ typescriptCopy code
30+ /**
31+ * 注册一个新的命令及其处理程序。
32+ * @param command {IPublicTypeCommand} - 要注册的命令。
33+ */
34+ registerCommand(command: IPublicTypeCommand): void;
35+ ```
36+
37+ ### unregisterCommand
38+
39+ 注销一个已存在的命令。
40+
41+ ```
42+ typescriptCopy code
43+ /**
44+ * 注销一个已存在的命令。
45+ * @param name {string} - 要注销的命令的名称。
46+ */
47+ unregisterCommand(name: string): void;
48+ ```
49+
50+ ### executeCommand
51+
52+ 根据名称和提供的参数执行命令,确保参数符合命令的定义。
53+
54+ ```
55+ typescriptCopy code
56+ /**
57+ * 根据名称和提供的参数执行命令。
58+ * @param name {string} - 要执行的命令的名称。
59+ * @param args {IPublicTypeCommandHandlerArgs} - 命令的参数。
60+ */
61+ executeCommand(name: string, args?: IPublicTypeCommandHandlerArgs): void;
62+ ```
63+
64+ ### batchExecuteCommand
65+
66+ 批量执行命令,在所有命令执行后进行重绘,历史记录中只记录一次。
67+
68+ ```
69+ typescriptCopy code
70+ /**
71+ * 批量执行命令,随后进行重绘,历史记录中只记录一次。
72+ * @param commands {Array} - 命令对象的数组,包含名称和可选参数。
73+ */
74+ batchExecuteCommand(commands: { name: string; args?: IPublicTypeCommandHandlerArgs }[]): void;
75+ ```
76+
77+ ### listCommands
78+
79+ 列出所有已注册的命令。
80+
81+ ```
82+ typescriptCopy code
83+ /**
84+ * 列出所有已注册的命令。
85+ * @returns {IPublicTypeListCommand[]} - 已注册命令的数组。
86+ */
87+ listCommands(): IPublicTypeListCommand[];
88+ ```
89+
90+ ### onCommandError
91+
92+ 为命令执行过程中的错误注册错误处理回调函数。
93+
94+ ```
95+ typescriptCopy code
96+ /**
97+ * 为命令执行过程中的错误注册一个回调函数。
98+ * @param callback {(name: string, error: Error) => void} - 错误处理的回调函数。
99+ */
100+ onCommandError(callback: (name: string, error: Error) => void): void;
101+ ```
Original file line number Diff line number Diff line change 11---
22title : common - 通用 API
3- sidebar_position : 11
3+ sidebar_position : 10
44---
55
66> ** @types ** [ IPublicApiCommon] ( https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/common.ts ) <br />
Original file line number Diff line number Diff line change 11---
22title : commonUI - UI 组件库
3- sidebar_position : 11
3+ sidebar_position : 10
44---
55
66## 简介
Original file line number Diff line number Diff line change 11---
22title : config - 配置 API
3- sidebar_position : 8
3+ sidebar_position : 5
44---
55
66> ** @types ** [ IPublicModelEngineConfig] ( https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/engine-config.ts ) <br />
Original file line number Diff line number Diff line change 11---
22title : config options - 配置列表
3- sidebar_position : 13
3+ sidebar_position : 5
44---
55
66> ** @types ** [ IPublicTypeEngineOptions] ( https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/engine-options.ts ) <br />
Original file line number Diff line number Diff line change 11---
22title : event - 事件 API
3- sidebar_position : 7
3+ sidebar_position : 10
44---
55
66> ** @types ** [ IPublicApiEvent] ( https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/event.ts ) <br />
Original file line number Diff line number Diff line change 11---
22title : hotkey - 快捷键 API
3- sidebar_position : 5
3+ sidebar_position : 10
44---
55
66> ** @types ** [ IPublicApiHotkey] ( https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/hotkey.ts ) <br />
Original file line number Diff line number Diff line change 11---
22title : init - 初始化 API
3- sidebar_position : 10
3+ sidebar_position : 0
44---
55
66> ** @since ** v1.0.0
Original file line number Diff line number Diff line change 11---
22title : logger - 日志 API
3- sidebar_position : 9
3+ sidebar_position : 10
44---
55
66> ** @types ** [ IPublicApiLogger] ( https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/logger.ts ) <br />
You can’t perform that action at this time.
0 commit comments