Pre Merge pull request !827 from 局外人/fix/editor

pull/827/MERGE
局外人 2025-10-10 10:41:13 +00:00 committed by Gitee
commit 0ca035ff85
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 16 additions and 0 deletions

View File

@ -58,6 +58,16 @@ watch(
emit('update:modelValue', val) emit('update:modelValue', val)
} }
) )
watch(
() => props.readonly,
(val) => {
if (val) {
editorRef.value?.disable()
} else {
editorRef.value?.enable()
}
}
)
const handleCreated = (editor: IDomEditor) => { const handleCreated = (editor: IDomEditor) => {
editorRef.value = editor editorRef.value = editor
@ -90,6 +100,12 @@ const editorConfig = computed((): IEditorConfig => {
}, },
autoFocus: false, autoFocus: false,
scroll: true, scroll: true,
EXTEND_CONF: {
mentionConfig: {
showModal: () => {},
hideModal: () => {}
}
},
MENU_CONF: { MENU_CONF: {
['uploadImage']: { ['uploadImage']: {
server: getUploadUrl(), server: getUploadUrl(),