feat:代码优化与Mock数据清理

This commit is contained in:
liailing1026
2026-01-30 15:27:00 +08:00
parent 6e4d8f0b6d
commit 1682a8892d
24 changed files with 1364 additions and 3193 deletions

View File

@@ -41,9 +41,9 @@ export function useNotification() {
}
const removeNotification = (id: string) => {
const index = notifications.value.findIndex((n) => n.id === id)
if (index !== -1) {
const notification = notifications.value[index]
const notification = notifications.value.find((n) => n.id === id)
if (notification) {
const index = notifications.value.indexOf(notification)
notifications.value.splice(index, 1)
notification.onClose?.()
}
@@ -120,7 +120,7 @@ export function useNotification() {
detailTitle: string,
detailMessage: string,
current?: number,
total?: number
total?: number,
) => {
const notification = notifications.value.find((n) => n.id === id)
if (notification) {