更新
This commit is contained in:
parent
d7e678b6dd
commit
be9e202802
@ -9,6 +9,7 @@ import WindowActiveState from "../action/WindowActiveState";
|
|||||||
export default class Alert extends WuhuBase {
|
export default class Alert extends WuhuBase {
|
||||||
className = 'Alert';
|
className = 'Alert';
|
||||||
private static container: HTMLElement = null;
|
private static container: HTMLElement = null;
|
||||||
|
private static totalCounter: number = 0;
|
||||||
|
|
||||||
private notify: MyHTMLElement = null;
|
private notify: MyHTMLElement = null;
|
||||||
private intervalID = -1;
|
private intervalID = -1;
|
||||||
@ -34,6 +35,7 @@ export default class Alert extends WuhuBase {
|
|||||||
|
|
||||||
this.callback = callback || (() => null);
|
this.callback = callback || (() => null);
|
||||||
Alert.create(this, msg, timeout || 3);
|
Alert.create(this, msg, timeout || 3);
|
||||||
|
Alert.totalCounter++;
|
||||||
Log.info('创建新通知:', this, msg);
|
Log.info('创建新通知:', this, msg);
|
||||||
if (sysNotify) NotificationUtils.getInstance().push(msg, options);
|
if (sysNotify) NotificationUtils.getInstance().push(msg, options);
|
||||||
}
|
}
|
||||||
@ -53,7 +55,7 @@ export default class Alert extends WuhuBase {
|
|||||||
let mouse_enter = false;
|
let mouse_enter = false;
|
||||||
element.addEventListener('mouseenter', () => mouse_enter = true, true);
|
element.addEventListener('mouseenter', () => mouse_enter = true, true);
|
||||||
element.addEventListener('mouseleave', () => mouse_enter = false);
|
element.addEventListener('mouseleave', () => mouse_enter = false);
|
||||||
// 通知进度条
|
// 通知进度条 TODO 改进
|
||||||
let progressCount = 101;
|
let progressCount = 101;
|
||||||
// 计时器
|
// 计时器
|
||||||
that.intervalID = window.setInterval(() => {
|
that.intervalID = window.setInterval(() => {
|
||||||
@ -83,6 +85,7 @@ export default class Alert extends WuhuBase {
|
|||||||
this.notify = null;
|
this.notify = null;
|
||||||
this.callback();
|
this.callback();
|
||||||
window.clearInterval(this.intervalID);
|
window.clearInterval(this.intervalID);
|
||||||
|
Alert.totalCounter--;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getElement() {
|
public getElement() {
|
||||||
|
|||||||
@ -209,22 +209,6 @@ div#wh-popup::after {
|
|||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*#wh-gym-info-cont {*/
|
|
||||||
/* background-color: #363636;*/
|
|
||||||
/* color: white;*/
|
|
||||||
/* padding: 8px;*/
|
|
||||||
/* font-size: 15px;*/
|
|
||||||
/* border-radius: 4px;*/
|
|
||||||
/* text-shadow: 0 0 2px black;*/
|
|
||||||
/* background-image: linear-gradient(90deg, transparent 50%, rgba(0, 0, 0, .07) 0);*/
|
|
||||||
/* background-size: 4px;*/
|
|
||||||
/* line-height: 20px;*/
|
|
||||||
/*}*/
|
|
||||||
|
|
||||||
/*#wh-gym-info-cont button {*/
|
|
||||||
/* cursor: pointer;*/
|
|
||||||
/*}*/
|
|
||||||
|
|
||||||
#wh-notify {
|
#wh-notify {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@ -233,8 +217,11 @@ div#wh-popup::after {
|
|||||||
width: 360px;
|
width: 360px;
|
||||||
z-index: 9999990;
|
z-index: 9999990;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#wh-notify a, #wh-notify button { pointer-events: all; }
|
||||||
|
|
||||||
#wh-notify a {
|
#wh-notify a {
|
||||||
color: red;
|
color: red;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@ -265,6 +252,7 @@ div#wh-popup::after {
|
|||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
margin: 6px 6px 0 0;
|
margin: 6px 6px 0 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
pointer-events: all;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wh-notify .wh-notify-item .wh-notify-msg {
|
#wh-notify .wh-notify-item .wh-notify-msg {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user