tangning 4 months ago
parent
commit
f0f357efb2
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/view/case/draw/board/index.js

+ 2 - 1
src/view/case/draw/board/index.js

@@ -3,6 +3,7 @@ import { text, table, compass, title, bgImage, customImage } from "./shape";
 import Layer from "./editCAD/Layer";
 import { history } from "./editCAD/History/History.js";
 import { uploadFile } from "@/store/system";
+import { uploadNewFile } from "@/store/case";
 
 // const toStore = (refs) => {
 //   return {
@@ -101,7 +102,7 @@ export const create = async (store, canvas) => {
           const url = await fetch(bgImage)
             .then((res) => res.blob())
             .then((blob) =>
-              uploadFile(new File([blob], (store.id || "image") + ".png"))
+              uploadNewFile(new File([blob], (store.id || "image") + ".png"))
             );
 
           floor.bgImage.url = url;