feat:通知主题修改
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user