新增未读消息计数和桌面图标徽章更新功能

This commit is contained in:
jxxghp
2025-06-12 22:58:16 +08:00
parent b69a338e13
commit 750b91db66
5 changed files with 178 additions and 10 deletions

17
src/types/global.d.ts vendored Normal file
View File

@@ -0,0 +1,17 @@
// PWA Badge API 类型定义
declare global {
interface Navigator {
/**
* 设置应用徽章数量
* @param contents 要显示的数量,可选
*/
setAppBadge(contents?: number): Promise<void>
/**
* 清除应用徽章
*/
clearAppBadge(): Promise<void>
}
}
export {}