We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1831c91 commit ac508d5Copy full SHA for ac508d5
src/pages/index.vue
@@ -1143,6 +1143,16 @@ export default {
1143
this.state.boardData.homework[this.currentEditSubject]?.content || "";
1144
1145
if (content !== originalContent.trim()) {
1146
+ // 如果内容为空且是自定义卡片,则删除该卡片
1147
+ if (!content && this.currentEditSubject.startsWith('custom-')) {
1148
+ delete this.state.boardData.homework[this.currentEditSubject];
1149
+ this.state.synced = false;
1150
+ if (this.autoSave) {
1151
+ await this.trySave(true);
1152
+ }
1153
+ this.state.dialogVisible = false;
1154
+ return;
1155
1156
// 如果是自定义卡片,保留其他属性
1157
if (this.state.boardData.homework[this.currentEditSubject].type === 'custom') {
1158
this.state.boardData.homework[this.currentEditSubject].content = content;
0 commit comments