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.
a5cd6bcd08
...
0ac7f6e6b1
@ -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)
|
||||||
|
|||||||
@ -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;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user