This commit is contained in:
qsh
2024-12-10 15:21:20 +08:00
parent e4ae5e275f
commit 1778ea9fb4
5 changed files with 478 additions and 58 deletions

View File

@@ -24,7 +24,27 @@ const props = defineProps({
default: () => undefined
},
readonly: propTypes.bool.def(false),
modelValue: propTypes.string.def('')
modelValue: propTypes.string.def(''),
toolbarConfig: {
type: Object,
default: () => ({
excludeKeys: [
'insertVideo', // 网络视频
'insertImage', // 网络图片
'insertLink', // 链接
'codeBlock', // 代码块
'headerSelect', // 标题
'blockquote', // 引用
'fontFamily', // 字体
'todo', // 代办
'group-indent', // 缩进
'emotion', // 表情
'undo', // 撤销
'redo', // 重做
'fullScreen'
]
})
}
})
const emit = defineEmits(['change', 'update:modelValue'])
@@ -212,24 +232,6 @@ const editorStyle = computed(() => {
}
})
const toolbarConfig = ref({
excludeKeys: [
'insertVideo', // 网络视频
'insertImage', // 网络图片
'insertLink', // 链接
'codeBlock', // 代码块
'headerSelect', // 标题
'blockquote', // 引用
'fontFamily', // 字体
'todo', // 代办
'group-indent', // 缩进
'emotion', // 表情
'undo', // 撤销
'redo', // 重做
'fullScreen'
]
})
// 回调函数
const handleChange = (editor: IDomEditor) => {
emit('change', editor)