fix(editor): initialize vditor after setup

This commit is contained in:
Tim
2025-07-04 16:41:08 +08:00
parent 106bb70441
commit 9f34c72ab0
2 changed files with 7 additions and 2 deletions

View File

@@ -60,7 +60,10 @@ export default {
'link',
'image'
],
toolbarConfig: { pin: true }
toolbarConfig: { pin: true },
after() {
vditorInstance.value = this
}
})
})

View File

@@ -57,9 +57,11 @@ export default {
cache: { enable: false },
input(value) {
emit('update:modelValue', value)
},
after() {
vditorInstance.value.setValue(props.modelValue)
}
})
vditorInstance.value.setValue(props.modelValue)
})
return {}