diff --git a/src/editor/html/quill-editor-preview/quill-editor-preview.tsx b/src/editor/html/quill-editor-preview/quill-editor-preview.tsx index b2f2ea4bfa58c6bc08d4b622b6e3cb92734da3d7..18c781d6e3043de207a7d862a1bd8267d136ed85 100644 --- a/src/editor/html/quill-editor-preview/quill-editor-preview.tsx +++ b/src/editor/html/quill-editor-preview/quill-editor-preview.tsx @@ -1,10 +1,6 @@ /* eslint-disable import/no-extraneous-dependencies */ import { defineComponent, onMounted, ref } from 'vue'; -import { - getHtmlProps, - getEditorEmits, - useNamespace, -} from '@ibiz-template/vue3-util'; +import { getHtmlProps, useNamespace } from '@ibiz-template/vue3-util'; import Quill from 'quill'; import { HtmlEditorController } from '../html-editor.controller'; import './quill-editor-preview.scss'; @@ -13,7 +9,6 @@ import './quill-editor-preview.scss'; const IBizQuillPreview: any = defineComponent({ name: 'IBizQuillPreview', props: getHtmlProps(), - emits: getEditorEmits(), setup(props, { emit }) { const ns = useNamespace('quill-preview'); const c: HtmlEditorController = props.controller; @@ -35,7 +30,7 @@ const IBizQuillPreview: any = defineComponent({ readOnly: true, }); if (c.valueMode === 'text') { - quill.setText(props.value); + quill.setText(props.value || ''); } }; @@ -69,7 +64,7 @@ const IBizQuillPreview: any = defineComponent({
) : null} - {!this.readOnly && !this.disable ? ( + {!this.readonly && !this.disabled ? (
diff --git a/src/editor/html/quill-editor/quill-editor.tsx b/src/editor/html/quill-editor/quill-editor.tsx index b22f9ba72a34664fb29b042f054a8de7cf881732..9dbd6108fa9b0bda0da75327cc4c9af1f826775f 100644 --- a/src/editor/html/quill-editor/quill-editor.tsx +++ b/src/editor/html/quill-editor/quill-editor.tsx @@ -100,12 +100,12 @@ const IBizQuill: any = defineComponent({ } }); if (c.valueMode === 'text') { - quill.setText(props.value); + quill.setText(props.value || ''); } }; watch( - () => [props.disable, props.readonly], + () => [props.disabled, props.readonly], () => { if (!quill) { return; @@ -140,7 +140,7 @@ const IBizQuill: any = defineComponent({ watch( () => props.value, () => { - if (!quill) { + if (!quill || !props.value) { return; } tempValue.value = props.value; @@ -199,8 +199,8 @@ const IBizQuill: any = defineComponent({ { this.editing = true; }} diff --git a/src/mob-app/App.tsx b/src/mob-app/App.tsx index f0c29e278cfec9fc27b15a40dd9a6288a0b7f33c..4da0d8a0a747baab423e0490c0ac9278d661bc14 100644 --- a/src/mob-app/App.tsx +++ b/src/mob-app/App.tsx @@ -19,7 +19,6 @@ export default defineComponent({ document.removeEventListener('keydown', listenDevtool); const devtoolConfig = ibiz.env.devtoolConfig || {}; - devtoolConfig.platform = 'mob'; ibiz.env.devtoolConfig = devtoolConfig; // 加载模块 const module = await import('@ibiz-template/devtool');