刘向辉
3 years ago
4 changed files with 59 additions and 1 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