From d3004dd80e5fa80c696eaf2aeff089c5fb01bfe2 Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期五, 10 十一月 2023 15:28:52 +0800 Subject: [PATCH] Merge branch 'dev' of http://192.168.5.5:10010/r/web/WMS into dev --- src/views/productManage/product/IconCropper.vue | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/views/productManage/product/IconCropper.vue b/src/views/productManage/product/IconCropper.vue index 4a2cf7c..cc074b0 100644 --- a/src/views/productManage/product/IconCropper.vue +++ b/src/views/productManage/product/IconCropper.vue @@ -2,7 +2,7 @@ <div class="cropper-wrapper"> <div v-if="isView"> <el-image :src="imageUrl" class="view-image"> - <div slot="error" class="image-slot"> + <div slot="error" class="image-slot no-cursor"> <i class="el-icon-picture-outline"></i> </div> </el-image> @@ -123,7 +123,8 @@ infoTrue: true // true 涓哄睍绀虹湡瀹炶緭鍑哄浘鐗囧楂� false 灞曠ず鐪嬪埌鐨勬埅鍥炬瀹介珮 }, // 闃叉閲嶅鎻愪氦 - loading: false + loading: false, + fileName: "" } }, mounted() { @@ -149,6 +150,7 @@ return false } console.log(file, fileList) + this.fileName = file.name // 涓婁紶鎴愬姛鍚庡皢鍥剧墖鍦板潃璧嬪�肩粰瑁佸壀妗嗘樉绀哄浘鐗� this.$nextTick(async () => { // base64鏂瑰紡 @@ -205,8 +207,12 @@ this.dialogVisible = false this.previewImg = URL.createObjectURL(blob) this.isPreview = true - console.log(blob) - this.$emit("getImageData", blob) + // blob杞琭ile + let file = new File([blob], this.fileName, { type: blob.type }) + // file杞琭ormData + let formData = new FormData() + formData.append("files", file) + this.$emit("getImageData", formData) }) // 鑾峰彇鎴浘鐨� base64 鏁版嵁 // this.$refs.cropper.getCropData(data => { -- Gitblit v1.8.0