🐛 Fix UI bugs

This commit is contained in:
LittleSheep 2024-03-20 23:20:00 +08:00
parent b2ed560019
commit 36afe6ce3f
4 changed files with 3 additions and 5 deletions

View File

@ -75,7 +75,7 @@ watch(editor, (val) => {
})
function leaveComment() {
editor.related.comment_to = props.item
editor.related.comment_to = JSON.parse(JSON.stringify(props.item))
editor.related.comment_to.model_type = props.dataset
editor.show.comment = true
}

View File

@ -25,13 +25,13 @@ const props = defineProps<{ item: any }>()
const isOwned = computed(() => props.item?.author_id === id.userinfo.data.id)
function editPost() {
editor.related.edit_to = props.item
editor.related.edit_to = JSON.parse(JSON.stringify(props.item))
if (editor.show.hasOwnProperty(props.item.model_type)) {
// @ts-ignore
editor.show[props.item.model_type] = true
}
if (props.item.model_type === "comment") {
editor.related.comment_to = props.item
editor.related.comment_to = JSON.parse(JSON.stringify(props.item))
}
}

View File

@ -209,7 +209,6 @@ function pasteMedia(evt: ClipboardEvent) {
}
})
})
evt.preventDefault()
}
}

View File

@ -154,7 +154,6 @@ function pasteMedia(evt: ClipboardEvent) {
Array.from(files).forEach((item) => {
media.value.upload(item)
})
evt.preventDefault()
}
}