mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-11 03:46:50 +08:00
refactor: 移除冗余代码并优化代码格式
- 删除了多处不必要的 console.log 语句 - 优化了部分代码的格式和结构 - 移除了无用的注释 - 统一了部分组件的样式
This commit is contained in:
@@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user