mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 12:20:28 +08:00
有消息提示时页面标题增加点符号提示
This commit is contained in:
@@ -60,6 +60,18 @@ Tea.context(function () {
|
||||
.params({})
|
||||
.success(function (resp) {
|
||||
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 () {
|
||||
let delay = 6000
|
||||
|
||||
Reference in New Issue
Block a user