UNPKG

olympus-r

Version:

一个力求简单易用的前端开发框架 #### 开发语言 TypeScript #### 核心架构 MVC #### 模块间通讯和解耦 采用事件机制,利用一个全局唯一的事件派发器进行模块间通讯,解耦模块间依赖 #### 表现层结构 使用桥接模式拆分接口与实现,达到一套核心驱动多套表现层的目的(目前支持DOM、Egret、PixiJS三种表现层),同时支持表现层的未来可扩展性 #### TypeScript装饰器注入 框架提供TypeScript装饰器注入功能,便捷获取托管对象。例如:

26 lines (25 loc) 681 B
import Dictionary from "../../utils/Dictionary"; /** * @author Raykid * @email initial_r@qq.com * @create date 2018-01-30 * @modify date 2018-01-30 * * 该接口规定了中介者具有的绑定功能 */ export default interface IMediatorBindPart<S = any> { /** * ViewModel引用 * * @type {*} * @memberof IMediatorBindPart<S> */ viewModel: any; /** * 绑定目标数组,key是当前编译目标对象,即currentTarget;value是命令本来所在的对象,即target * * @type {Dictionary<S, S>[]} * @memberof IMediatorBindPart<S> */ readonly bindTargets: Dictionary<S, S>[]; }