@lcap/asl
Version:
NetEase Application Specific Language
64 lines (63 loc) • 1.36 kB
TypeScript
import { LEVEL_ENUM, Vertex, Element, ActionOptions } from '..';
/**
* 前端组件事件
*/
export declare class Event extends Vertex {
/**
* 概念类型
*/
readonly level: LEVEL_ENUM;
/**
* 事件 Id
*/
readonly id: string;
/**
* 事件名
*/
readonly name: string;
/**
* 事件名称
*/
readonly value: string;
/**
* 逻辑 Id
*/
readonly logicId?: string;
/**
* 逻辑 Id
*/
readonly logic?: string;
/**
* 所属元素 Id
*/
readonly elementId: string;
/**
* 所属元素
*/
readonly element: Element;
/**
* @param source 需要合并的部分参数
*/
constructor(source?: Partial<Event>);
/**
* 转换成 Vue 的模板格式
*/
toVue(element?: Element, finalCode?: boolean): string;
/**
* 从后端 JSON 生成规范的 Event 对象
*/
static from(source: any, element: Element): Event;
/**
* 添加组件事件
*/
create(none?: void, actionOptions?: ActionOptions): Promise<this>;
/**
* 删除组件事件
*/
delete(none?: void, actionOptions?: ActionOptions): Promise<void>;
/**
* 修改组件事件
*/
update(data: Event, actionOptions?: ActionOptions): Promise<this>;
}
export default Event;