From 5408277cd8e7d7e51a3ac21ed305427e571d8eda Mon Sep 17 00:00:00 2001 From: jiangzhe <244140623@qq.com> Date: Wed, 8 May 2024 14:01:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E6=B5=8B=E8=AF=95=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 - pnpm-lock.yaml | 7 ------- src/components/ImageUpload/index.vue | 16 ---------------- 3 files changed, 24 deletions(-) diff --git a/package.json b/package.json index d26d073..de7179f 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "path-to-regexp": "6.2.0", "pinia": "2.0.22", "screenfull": "6.0.0", - "spark-md5": "^3.0.2", "vform3-builds": "3.0.8", "vue": "3.2.45", "vue-cropper": "1.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 183569f..64cfe0a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -62,9 +62,6 @@ dependencies: screenfull: specifier: 6.0.0 version: 6.0.0 - spark-md5: - specifier: ^3.0.2 - version: 3.0.2 vform3-builds: specifier: 3.0.8 version: 3.0.8 @@ -4530,10 +4527,6 @@ packages: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} deprecated: Please use @jridgewell/sourcemap-codec instead - /spark-md5@3.0.2: - resolution: {integrity: sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw==} - dev: false - /split-string@3.1.0: resolution: {integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==} engines: {node: '>=0.10.0'} diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index 4eedf1e..04cb588 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -32,7 +32,6 @@ import { ComponentInternalInstance } from "vue"; import { OssVO } from "@/api/system/oss/types"; import { propTypes } from '@/utils/propTypes'; import { globalHeaders } from "@/utils/request"; -import SparkMD5 from 'spark-md5' const props = defineProps({ modelValue: [String, Object, Array], @@ -97,8 +96,6 @@ watch(() => props.modelValue, async val => { /** 上传前loading加载 */ const handleBeforeUpload = (file: any) => { - getMD5(file) - let isImg = false; if (props.fileType.length) { let fileExtension = ""; @@ -196,19 +193,6 @@ const listToString = (list: any[], separator?: string) => { } return strs != "" ? strs.substring(0, strs.length - 1) : ""; } - -const getMD5 = (file: any) => { - const spark = new SparkMD5.ArrayBuffer() - const fileReader = new FileReader() - fileReader.onload = (e: any) => { - spark.append(e.target.result) - const md5 = spark.end() - console.log('md5', md5) - // file.md5 = md5 - // upload(file) - } - fileReader.readAsArrayBuffer(file) -}