mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-06 23:00:25 +08:00
有消息提示时页面标题增加点符号提示
This commit is contained in:
@@ -60,6 +60,18 @@ Tea.context(function () {
|
|||||||
.params({})
|
.params({})
|
||||||
.success(function (resp) {
|
.success(function (resp) {
|
||||||
this.globalMessageBadge = resp.data.count
|
this.globalMessageBadge = resp.data.count
|
||||||
|
|
||||||
|
// add dot to title
|
||||||
|
let dots = "••• "
|
||||||
|
if (typeof document.title == "string") {
|
||||||
|
if (resp.data.count > 0) {
|
||||||
|
if (!document.title.startsWith(dots)) {
|
||||||
|
document.title = dots + document.title
|
||||||
|
}
|
||||||
|
} else if (document.title.startsWith(dots)) {
|
||||||
|
document.title = document.title.substring(dots.length)
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.done(function () {
|
.done(function () {
|
||||||
let delay = 6000
|
let delay = 6000
|
||||||
|
|||||||
Reference in New Issue
Block a user