陈鹏飞
3 years ago
5 changed files with 75 additions and 4 deletions
@ -0,0 +1,29 @@
|
||||
import { Event_Base } from "../event-base"; |
||||
import { EventManager } from "../event-manager"; |
||||
|
||||
/** |
||||
* 加载状态 发生变化 (loading遮罩) |
||||
*/ |
||||
export class Event_LoadingChange extends Event_Base { |
||||
|
||||
/** |
||||
* loading中 |
||||
*/ |
||||
static isLoading: boolean = false; |
||||
|
||||
/** |
||||
* 显示loading条 |
||||
*/ |
||||
showLoading: boolean; |
||||
|
||||
/** |
||||
* 派发事件 |
||||
* @param showLoading 显示loading条 |
||||
*/ |
||||
static dispatch(showLoading: boolean) { |
||||
let eventData = new Event_LoadingChange(); |
||||
eventData.showLoading = showLoading; |
||||
EventManager.dispatch<Event_LoadingChange>(Event_LoadingChange, eventData); |
||||
Event_LoadingChange.isLoading = showLoading; |
||||
} |
||||
} |
Loading…
Reference in new issue