export interface PlainObject { [propsName: string]: any; } export interface VJson { [propName: string]: any; } export interface Model { success: boolean; msg: string; data: any; } /** * 处理 VJson 的 * @param this 是指 scope 对象 * @param vjson 是待处理的 VJson 对象 * @result 返回处理 VJson 的 Promise 异步结果 */ export declare type ConfigProcess = (me: any, config: any) => any; /** * 参数的填写类型 * module 选择一个功能模块 * viewModel 从当前模块的 model 中,选择一个属性 * refs 从当前模块的 refs 中选一个控件 * event 当成事件输入框来填写 * lookup 填写 lookup 表达式对象 * ()=> Promise[]> 函数的返回结果,作为填写范围 * string 任意字符串 * object 任意对象 (JSON5) */ export declare type LibParamType = 'module' | 'viewModel' | 'refs' | 'event' | 'lookup' | 'string' | 'object' | (() => Promise); /** * 注册函数中的参数 */ export interface FunctionArgument { /** * 参数值存放的内容(类型) * module 选择一个功能模块 * control 从当前模块的 controller 中选择一个方法 * viewModel 从当前模块的 model 中,选择一个属性 * refs 从当前模块的 refs 中选一个控件 * event 当成事件输入框来填写 * string 任意字符串 * object 任意对象 (JSON5) */ type: LibParamType; /** * 参数中文说明 */ title: string; /** * 参数名称 */ name: string; /** * 是否允许为空 */ allowEmpty?: boolean; /** * 过滤器 * @param list */ filter?: (items: any[]) => any[]; } /** * 注册函数, 用在 @Lib 装饰器 */ export interface FunctionRegiste { /** * 函数名 */ name?: string; /** * 中文说明 */ title?: string; /** * 作者 */ author?: string; /** * 创建时间 */ createAt?: string; /** * 更新时间 */ updateAt?: string; /** * 备注 */ remark?: string; /** * 类型 * system: 系统方法 * format: 格式化作用 */ type: 'system' | 'format'; /** * 分类名称 */ category?: string; /** * 文档链接 */ link?: string; /** * 方法体 */ target?: Function; }