diff --git a/src/components/Editor/src/Editor.vue b/src/components/Editor/src/Editor.vue index c2905ff8b..36fe1650f 100644 --- a/src/components/Editor/src/Editor.vue +++ b/src/components/Editor/src/Editor.vue @@ -8,6 +8,7 @@ import { ElMessage } from 'element-plus' import { useLocaleStore } from '@/store/modules/locale' import { getRefreshToken, getTenantId } from '@/utils/auth' import { getUploadUrl } from '@/components/UploadFile/src/useUpload' +import merge from 'lodash-es/merge' defineOptions({ name: 'Editor' }) @@ -60,7 +61,11 @@ watch( ) watch( () => props.readonly, - (val) => { + async (val) => { + // 特殊:等待 editorRef 渲染完成 + if (!editorRef.value) { + await nextTick() + } if (val) { editorRef.value?.disable() } else { @@ -75,7 +80,7 @@ const handleCreated = (editor: IDomEditor) => { // 编辑器配置 const editorConfig = computed((): IEditorConfig => { - return Object.assign( + return merge( { placeholder: '请输入内容...', readOnly: props.readonly, diff --git a/src/views/mall/product/spu/form/DescriptionForm.vue b/src/views/mall/product/spu/form/DescriptionForm.vue index 600cb0087..63bc9d869 100644 --- a/src/views/mall/product/spu/form/DescriptionForm.vue +++ b/src/views/mall/product/spu/form/DescriptionForm.vue @@ -3,8 +3,7 @@ - - +