1
0
mirror of https://github.com/ZeroCatDev/Classworks.git synced 2025-12-10 06:43:10 +00:00

Compare commits

..

No commits in common. "a5cd6bcd084fa12de1128ee55c41f354dab1ae1b" and "0ac7f6e6b19a14eb7850cc0e5bdcf02732ee335d" have entirely different histories.

2 changed files with 2 additions and 6 deletions

View File

@ -681,9 +681,7 @@ export default {
try { try {
this.persistentNotifications = this.persistentNotifications.filter(n => n.id !== id) this.persistentNotifications = this.persistentNotifications.filter(n => n.id !== id)
// {} [] await dataProvider.saveData('notification-list', this.persistentNotifications)
const dataToSave = this.persistentNotifications.length > 0 ? this.persistentNotifications : {}
await dataProvider.saveData('notification-list', dataToSave)
this.$message?.success('已删除') this.$message?.success('已删除')
} catch (e) { } catch (e) {
console.error('删除失败', e) console.error('删除失败', e)

View File

@ -2066,9 +2066,7 @@ export default {
}, },
async removePersistentNotification(id) { async removePersistentNotification(id) {
this.persistentNotifications = this.persistentNotifications.filter(n => n.id !== id); this.persistentNotifications = this.persistentNotifications.filter(n => n.id !== id);
// {} [] await dataProvider.saveData('notification-list', this.persistentNotifications);
const dataToSave = this.persistentNotifications.length > 0 ? this.persistentNotifications : {};
await dataProvider.saveData('notification-list', dataToSave);
this.notificationDetailDialog = false; this.notificationDetailDialog = false;
}, },
}, },