feat:通知主题修改

This commit is contained in:
liailing1026
2026-01-26 17:25:23 +08:00
parent 418b2e5f8f
commit 1749ae4f1e
2 changed files with 49 additions and 8 deletions

View File

@@ -133,6 +133,14 @@ export function useNotification() {
}
}
// 更新通知的主标题
const updateNotificationTitle = (id: string, title: string) => {
const notification = notifications.value.find((n) => n.id === id)
if (notification) {
notification.title = title
}
}
const clear = () => {
notifications.value.forEach((n) => n.onClose?.())
notifications.value = []
@@ -149,6 +157,7 @@ export function useNotification() {
progress,
updateProgress,
updateProgressDetail,
updateNotificationTitle,
clear,
}
}