[]
命令类型基类。通过插件实现的命令类型需要从这个类继承。
• new CommandBase()
• CommandExecutor: CommandExecutor
命令执行器
• CommandParam: object
C# 命令类属性的数据。
• runTimePageName: string
运行时页面唯一标识
▸ evaluateFormula(formula): any
计算公式。
| 属性名 | 类型 | 说明 |
|---|---|---|
formula |
string |
公式。 |
any
计算结果。
▸ execute(): void | Promise<void>
执行这个命令。需要在子类实现。
void | Promise<void>
▸ executeCustomCommandObject(command, initParam, eventType?, callbackOnCommandCompleted?): any
执行自定义命令对象列表。
| 属性名 | 类型 | 说明 |
|---|---|---|
command |
ICustomCommandObject |
命令。 |
initParam |
Object |
上下文参数值。 |
eventType? |
string |
事件类型(可选,用于区分不同命令)。 |
callbackOnCommandCompleted? |
Function |
命令执行完成时回调函数(可选)。 |
any
▸ getApplicationResource(key, ...args): string
获取应用资源
| 属性名 | 类型 | 说明 |
|---|---|---|
key |
string |
资源名称 |
...args |
string[] |
占位符的值 |
string
▸ getBindingDataSourceValue(bindingDataSourceModel, options): Promise<any>
获取数据库数据。
| 属性名 | 类型 | 说明 |
|---|---|---|
bindingDataSourceModel |
any |
数据源查询模型,从设计器的BindingDataSourceProperty生成。 |
options |
queryDataOption |
查询配置。 |
Promise<any>
Promise<any>
▸ Protected getCellLocation(formula): CellLocationInfo
将一个公式转换成单元格位置信息。
| 属性名 | 类型 | 说明 |
|---|---|---|
formula |
string |
Excel 公式,比如=A1。 |
返回单元格的位置,如果公式不是指向单元格,比如=SUM(1,2),返回 null。
▸ getFormulaCalcContext(): FormulaCalcContext
获取用于公式计算的数据上下文。
▸ getPluginResource(key, ...args): string
获取插件的多语言资源
| 属性名 | 类型 | 说明 |
|---|---|---|
key |
string |
资源名称 |
...args |
string[] |
占位符的值 |
string
▸ log(logText): void
写日志。
| 属性名 | 类型 | 说明 |
|---|---|---|
logText |
string |
日志内容。 |
void