export interface IResource { /** * 必填,资源名 */ name: string; /** * 必填,资源类型 */ type: string; [key: string]: any; } /** * 应用/组件 绑定的监听器 */ export interface IListener { /** * 可选,listener id */ id?: string; /** * 可选,是否在捕获阶段响应 * @default false */ isCapturePhase?: boolean; /** * 可选,是否附上事件传播 */ noPropagation?: boolean; /** * 可选, 监听器类型 */ type?: string; /** * 可选, 绑定的处理器 */ handler?: IHandler; /** * 必填, 监听的事件名, 来源于 IEvents 定义的事件 */ eventName: string; } /** * 监听器触发的处理器 handler中可查询 诸如数据源信息以及各种事件信息 */ export interface IHandler { /** * 必填, 处理器的名称 */ name: string; /** * 可选, 处理器所属的模块 */ module?: string; /** * @deprecated * 可选,handler inline 代码 */ code?: string; /** * 可选,handler inline 代码表达式 * 因为主要作为引用来使用,使用表达式更合适 */ ':code'?: string; /** * 可选, 处理器的入参 */ params?: object | any[]; } /** * 变量 */ export interface IDataset { /** 状态 */ state?: { [key: string]: IStateVariable | any; }; /** 页面/应用 参数 */ params?: { [key: string]: IParamsVariable; }; /** * 可选,页面配置名称 * @deprecated 请使用页面 attributes.title 代替 */ pageName?: string; } export interface IStateVariable { /** 中文名 */ label?: string; /** 变量类型 */ varType: 'state'; /** * 原始数据类型 * string, number, object, array, boolean * * @todo 考虑把它改成枚举类型 */ dataType: string; /** 初始值 */ initialValue?: any; /** * 是否启用本地同步? */ enableSyncLocal?: boolean; [key: string]: any; } /** 页面参数定义 */ export interface IParamsVariable { /** 参数名称 */ name: string; /** 变量类型 */ varType: 'params'; /** 中文名 */ label?: string; /** 是否必填, 默认 false */ required?: boolean; /** 默认值 */ initialValue?: string; /** * 示例值, ide 开发时使用 * @deprecated */ sampleValue?: string; } //# sourceMappingURL=common.d.ts.map