fix handling of note objects in NoteSimple and NoteSub
This commit is contained in:
parent
1a14424be8
commit
487cfed5f3
4 changed files with 22 additions and 20 deletions
|
|
@ -51,11 +51,13 @@ const props = defineProps<{
|
|||
const showContent = ref(prefer.s.uncollapseCW);
|
||||
const isDeleted = ref(false);
|
||||
|
||||
const mergedCW = computed(() => computeMergedCw(props.note));
|
||||
|
||||
const note = ref(deepClone(props.note));
|
||||
|
||||
setupNoteViewInterruptors(note, isDeleted);
|
||||
const mergedCW = computed(() => computeMergedCw(note.value));
|
||||
|
||||
if (!note.value.isSchedule) {
|
||||
setupNoteViewInterruptors(note, null);
|
||||
}
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'editScheduleNote'): void;
|
||||
|
|
@ -69,7 +71,7 @@ async function deleteScheduleNote() {
|
|||
cancelText: i18n.ts.cancel,
|
||||
});
|
||||
if (canceled) return;
|
||||
await os.apiWithDialog('notes/schedule/delete', { noteId: props.note.id })
|
||||
await os.apiWithDialog('notes/schedule/delete', { noteId: note.value.id })
|
||||
.then(() => {
|
||||
isDeleted.value = true;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue