2020-07-22 23:30:31 +08:00
|
|
|
module es {
|
2020-10-27 18:08:49 +08:00
|
|
|
export interface IUpdatable {
|
|
|
|
|
enabled: boolean;
|
|
|
|
|
updateOrder: number;
|
|
|
|
|
update();
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-22 23:30:31 +08:00
|
|
|
/**
|
|
|
|
|
* 用于比较组件更新排序
|
|
|
|
|
*/
|
2020-10-27 18:08:49 +08:00
|
|
|
export class IUpdatableComparer implements IComparer<IUpdatable> {
|
2020-07-28 16:25:20 +08:00
|
|
|
public compare(a: Component, b: Component) {
|
|
|
|
|
return a.updateOrder - b.updateOrder;
|
|
|
|
|
}
|
2020-07-22 23:30:31 +08:00
|
|
|
}
|
|
|
|
|
}
|