tangning пре 5 месеци
родитељ
комит
83ec91f9e1
1 измењених фајлова са 3 додато и 2 уклоњено
  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]