mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-16 21:50:24 +08:00
实时访问日志有弹窗打开时,暂时不更新数据
This commit is contained in:
@@ -353,6 +353,9 @@ window.teaweb = {
|
|||||||
Swal: function () {
|
Swal: function () {
|
||||||
return this.isPopup() ? window.parent.Swal : window.Swal;
|
return this.isPopup() ? window.parent.Swal : window.Swal;
|
||||||
},
|
},
|
||||||
|
hasPopup: function () {
|
||||||
|
return document.getElementsByClassName("swal2-container").length > 0
|
||||||
|
},
|
||||||
success: function (message, callback) {
|
success: function (message, callback) {
|
||||||
var width = "20em";
|
var width = "20em";
|
||||||
if (message.length > 30) {
|
if (message.length > 30) {
|
||||||
|
|||||||
@@ -8,6 +8,14 @@ Tea.context(function () {
|
|||||||
this.isLoaded = false
|
this.isLoaded = false
|
||||||
|
|
||||||
this.load = function () {
|
this.load = function () {
|
||||||
|
// 如果有弹窗时,暂时不更新
|
||||||
|
if (teaweb.hasPopup()) {
|
||||||
|
this.$delay(function () {
|
||||||
|
this.load()
|
||||||
|
}, 5000)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.$post("$")
|
this.$post("$")
|
||||||
.params({
|
.params({
|
||||||
serverId: this.serverId,
|
serverId: this.serverId,
|
||||||
|
|||||||
Reference in New Issue
Block a user