🐛 Fix UI bugs
This commit is contained in:
parent
b2ed560019
commit
36afe6ce3f
@ -75,7 +75,7 @@ watch(editor, (val) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
function leaveComment() {
|
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.related.comment_to.model_type = props.dataset
|
||||||
editor.show.comment = true
|
editor.show.comment = true
|
||||||
}
|
}
|
||||||
|
@ -25,13 +25,13 @@ const props = defineProps<{ item: any }>()
|
|||||||
const isOwned = computed(() => props.item?.author_id === id.userinfo.data.id)
|
const isOwned = computed(() => props.item?.author_id === id.userinfo.data.id)
|
||||||
|
|
||||||
function editPost() {
|
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)) {
|
if (editor.show.hasOwnProperty(props.item.model_type)) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
editor.show[props.item.model_type] = true
|
editor.show[props.item.model_type] = true
|
||||||
}
|
}
|
||||||
if (props.item.model_type === "comment") {
|
if (props.item.model_type === "comment") {
|
||||||
editor.related.comment_to = props.item
|
editor.related.comment_to = JSON.parse(JSON.stringify(props.item))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,7 +209,6 @@ function pasteMedia(evt: ClipboardEvent) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
evt.preventDefault()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,6 @@ function pasteMedia(evt: ClipboardEvent) {
|
|||||||
Array.from(files).forEach((item) => {
|
Array.from(files).forEach((item) => {
|
||||||
media.value.upload(item)
|
media.value.upload(item)
|
||||||
})
|
})
|
||||||
evt.preventDefault()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user