@farris/devkit-vue
Version:
43 lines (42 loc) • 930 B
TypeScript
import { Injector } from '../common';
import { VariableParseService } from '../variable/index';
import { ViewModelState, ViewModel } from '../viewmodel';
import { Command } from './command';
/**
* 命令上下文
*/
declare class CommandContext {
/**
* 命令信息
*/
command: Command;
/**
* 视图模型
*/
viewModel: ViewModel<ViewModelState>;
/**
* 构造方法
*/
constructor(command: Command, viewModel: ViewModel<ViewModelState>);
/**
* 获取参数
*/
getParam(name: string): any;
/**
* 获取事件参数
*/
getEventParam(): any;
/**
* 获取视图模型
*/
getViewModel(): ViewModel<ViewModelState>;
/**
* 获取视图模型
*/
getViewModelInjector(): Injector;
/**
* 获取变量解析服务
*/
getVariableParseService(): VariableParseService;
}
export { CommandContext };