fix: 🐛 修复因接口调整而影响的调用页面的问题

This commit is contained in:
hxr
2024-05-04 13:15:06 +08:00
parent 088bc5e48f
commit 425841ad45
6 changed files with 13 additions and 14 deletions

View File

@@ -23,7 +23,7 @@
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
// API 引用
import { uploadFileApi } from "@/api/file";
import FileAPI from "@/api/file";
const props = defineProps({
modelValue: {
@@ -46,9 +46,8 @@ const editorConfig = ref({
uploadImage: {
// 自定义图片上传
async customUpload(file: any, insertFn: any) {
uploadFileApi(file).then((response) => {
const url = response.data.url;
insertFn(url);
FileAPI.upload(file).then((data) => {
insertFn(data.url);
});
},
},