refactor: 移除冗余代码并优化代码格式

- 删除了多处不必要的 console.log 语句
- 优化了部分代码的格式和结构
- 移除了无用的注释
- 统一了部分组件的样式
This commit is contained in:
du.meimei
2025-04-25 17:48:13 +08:00
parent 98bc7af147
commit bb07874fee
14 changed files with 71 additions and 90 deletions

View File

@@ -38,7 +38,7 @@ export default {
[{ list: 'ordered' }, { list: 'bullet' }, { list: 'check' }],
[{ indent: '-1' }, { indent: '+1' }], // outdent/indent
[{ color: [] }, { background: [] }], // dropdown with defaults from theme
['clean','link', 'image']
['clean', 'link', 'image']
]
}
},
@@ -46,14 +46,10 @@ export default {
handleImageAdded(file, Editor, cursorLocation, resetUploader) {
let formData = new FormData()
formData.append('file', file) //第一个file 后台接收的参数名
uploadFileComponentForEditor(formData)
.then(result => {
let url = result.content.fileUrl // 返回给你的图片路径
Editor.insertEmbed(cursorLocation, 'image', url)
})
.catch(err => {
console.log(err)
})
uploadFileComponentForEditor(formData).then(result => {
let url = result.content.fileUrl // 返回给你的图片路径
Editor.insertEmbed(cursorLocation, 'image', url)
})
}
}
}