tangning il y a 5 mois
Parent
commit
83ec91f9e1
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 3 2
      src/view/case/draw/index.vue

+ 3 - 2
src/view/case/draw/index.vue

@@ -147,9 +147,10 @@ const getStore = async () => {
 const handleCropping = async (data) => {
   const appStore = await getStore();
   const args = props.value!;
-  console.log('titleShape', appStore, board.value, args);
+  let imgUrl = args.inAdd ? ognFilesUrl.value : appStore.store.ognFilesUrl;
+  console.log('titleShape', appStore, board.value, imgUrl);
   const {width, height } = appStore.store.floors?.[0].bgImage;
-  const blob = await fetch(appStore.store.ognFilesUrl || state.value.selectShape.data.url).then(res => res.blob());
+  const blob = await fetch(imgUrl || state.value.selectShape.data.url).then(res => res.blob());
   const cropBlob = await imageCropper({
       img: blob,
       fixed: [width, height]