mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-11 10:10:28 +08:00
优化分页条数修改/在弹窗下不运行某些任务
This commit is contained in:
@@ -11,6 +11,7 @@ Tea.context(function () {
|
||||
this.$refs.focus.focus()
|
||||
}
|
||||
|
||||
if (!window.IS_POPUP) {
|
||||
// 检查消息
|
||||
this.checkMessages()
|
||||
|
||||
@@ -19,6 +20,7 @@ Tea.context(function () {
|
||||
|
||||
// 检查DNS同步
|
||||
this.loadDNSTasks()
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
@@ -204,11 +206,17 @@ window.NotifyPopup = function (resp) {
|
||||
|
||||
window.ChangePageSize = function (size) {
|
||||
let url = window.location.toString();
|
||||
url = url.replace(/page=\d+/g, "page=1")
|
||||
if (url.indexOf("pageSize") > 0) {
|
||||
url = url.replace(/pageSize=\d+/g, "pageSize=" + size);
|
||||
url = url.replace(/pageSize=\d+/g, "pageSize=" + size)
|
||||
} else {
|
||||
if (url.indexOf("?") > 0) {
|
||||
let anchorIndex = url.indexOf("#")
|
||||
if (anchorIndex < 0) {
|
||||
url += "&pageSize=" + size;
|
||||
} else {
|
||||
url = url.substring(0, anchorIndex) + "&pageSize=" + size + url.substr(anchorIndex);
|
||||
}
|
||||
} else {
|
||||
url += "?pageSize=" + size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user