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
@@ -60,7 +60,10 @@ export default {
'link', 'link',
'image' 'image'
], ],
toolbarConfig: { pin: true } toolbarConfig: { pin: true },
after() {
vditorInstance.value = this
}
}) })
}) })
+3 -1
View File
@@ -57,9 +57,11 @@ export default {
cache: { enable: false }, cache: { enable: false },
input(value) { input(value) {
emit('update:modelValue', value) emit('update:modelValue', value)
},
after() {
vditorInstance.value.setValue(props.modelValue)
} }
}) })
vditorInstance.value.setValue(props.modelValue)
}) })
return {} return {}