refactor: 使用Editor组件替换WxEditor

This commit is contained in:
dhb52
2023-04-14 14:49:19 +08:00
parent f25a4d7343
commit 813e7d2776
5 changed files with 307 additions and 375 deletions

View File

@ -20,7 +20,7 @@ const props = defineProps({
editorId: propTypes.string.def('wangeEditor-1'),
height: propTypes.oneOfType([Number, String]).def('500px'),
editorConfig: {
type: Object as PropType<IEditorConfig>,
type: Object as PropType<Partial<IEditorConfig>>,
default: () => undefined
},
readonly: propTypes.bool.def(false),
@ -147,6 +147,7 @@ const editorConfig = computed((): IEditorConfig => {
props.editorConfig || {}
)
})
const editorStyle = computed(() => {
return {
height: isNumber(props.height) ? `${props.height}px` : props.height