Merge pull request #67 from nagisa77/codex/fix-uncaught-runtime-error-with-vditor

Fix Vditor init timing
This commit is contained in:
Tim
2025-07-04 16:41:21 +08:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

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

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 {}