fix: 修复 Editor 切换 readonly 时只读状态无效的 bug
This commit is contained in:
@ -58,6 +58,16 @@ watch(
|
||||
emit('update:modelValue', val)
|
||||
}
|
||||
)
|
||||
watch(
|
||||
() => props.readonly,
|
||||
(val) => {
|
||||
if (val) {
|
||||
editorRef.value?.disable()
|
||||
} else {
|
||||
editorRef.value?.enable()
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
const handleCreated = (editor: IDomEditor) => {
|
||||
editorRef.value = editor
|
||||
|
||||
Reference in New Issue
Block a user