mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-06-27 08:04:22 +00:00
Preserve comment text on submission errors
This commit is contained in:
@@ -67,9 +67,11 @@ export default {
|
||||
if (!vditorInstance.value || isDisabled.value) return
|
||||
const value = vditorInstance.value.getValue()
|
||||
console.debug('CommentEditor submit', value)
|
||||
emit('submit', value)
|
||||
vditorInstance.value.setValue('')
|
||||
text.value = ''
|
||||
emit('submit', value, () => {
|
||||
if (!vditorInstance.value) return
|
||||
vditorInstance.value.setValue('')
|
||||
text.value = ''
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user