去除测试代码
This commit is contained in:
parent
787ee54aa3
commit
5408277cd8
|
@ -36,7 +36,6 @@
|
||||||
"path-to-regexp": "6.2.0",
|
"path-to-regexp": "6.2.0",
|
||||||
"pinia": "2.0.22",
|
"pinia": "2.0.22",
|
||||||
"screenfull": "6.0.0",
|
"screenfull": "6.0.0",
|
||||||
"spark-md5": "^3.0.2",
|
|
||||||
"vform3-builds": "3.0.8",
|
"vform3-builds": "3.0.8",
|
||||||
"vue": "3.2.45",
|
"vue": "3.2.45",
|
||||||
"vue-cropper": "1.0.3",
|
"vue-cropper": "1.0.3",
|
||||||
|
|
|
@ -62,9 +62,6 @@ dependencies:
|
||||||
screenfull:
|
screenfull:
|
||||||
specifier: 6.0.0
|
specifier: 6.0.0
|
||||||
version: 6.0.0
|
version: 6.0.0
|
||||||
spark-md5:
|
|
||||||
specifier: ^3.0.2
|
|
||||||
version: 3.0.2
|
|
||||||
vform3-builds:
|
vform3-builds:
|
||||||
specifier: 3.0.8
|
specifier: 3.0.8
|
||||||
version: 3.0.8
|
version: 3.0.8
|
||||||
|
@ -4530,10 +4527,6 @@ packages:
|
||||||
resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==}
|
resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==}
|
||||||
deprecated: Please use @jridgewell/sourcemap-codec instead
|
deprecated: Please use @jridgewell/sourcemap-codec instead
|
||||||
|
|
||||||
/spark-md5@3.0.2:
|
|
||||||
resolution: {integrity: sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw==}
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/split-string@3.1.0:
|
/split-string@3.1.0:
|
||||||
resolution: {integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==}
|
resolution: {integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==}
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
|
|
|
@ -32,7 +32,6 @@ import { ComponentInternalInstance } from "vue";
|
||||||
import { OssVO } from "@/api/system/oss/types";
|
import { OssVO } from "@/api/system/oss/types";
|
||||||
import { propTypes } from '@/utils/propTypes';
|
import { propTypes } from '@/utils/propTypes';
|
||||||
import { globalHeaders } from "@/utils/request";
|
import { globalHeaders } from "@/utils/request";
|
||||||
import SparkMD5 from 'spark-md5'
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: [String, Object, Array],
|
modelValue: [String, Object, Array],
|
||||||
|
@ -97,8 +96,6 @@ watch(() => props.modelValue, async val => {
|
||||||
|
|
||||||
/** 上传前loading加载 */
|
/** 上传前loading加载 */
|
||||||
const handleBeforeUpload = (file: any) => {
|
const handleBeforeUpload = (file: any) => {
|
||||||
getMD5(file)
|
|
||||||
|
|
||||||
let isImg = false;
|
let isImg = false;
|
||||||
if (props.fileType.length) {
|
if (props.fileType.length) {
|
||||||
let fileExtension = "";
|
let fileExtension = "";
|
||||||
|
@ -196,19 +193,6 @@ const listToString = (list: any[], separator?: string) => {
|
||||||
}
|
}
|
||||||
return strs != "" ? strs.substring(0, strs.length - 1) : "";
|
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)
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
Loading…
Reference in New Issue