Skip to content

Commit f5c6f95

Browse files
author
QM303176530
committed
修复warning 前端启动自动打开文档
1 parent b7fd730 commit f5c6f95

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
6-
"serve": "vue-cli-service serve",
6+
"serve": "start https://www.gin-vue-admin.com && vue-cli-service serve",
77
"build": "vue-cli-service build",
88
"lint": "vue-cli-service lint"
99
},

web/src/components/upload/image.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ export default {
6161
}
6262
return isRightSize;
6363
},
64-
handleImageSuccess(res, file) {
64+
handleImageSuccess(res) {
6565
// this.imageUrl = URL.createObjectURL(file.raw);
66-
const { code, msg, data } = res;
66+
const { data } = res;
6767
if (data.file) {
6868
this.$emit("change", data.file.url);
6969
}

web/src/utils/image.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export default class ImageCompress {
3333

3434
if (newImgSize > this.fileSize) {
3535
console.log('图片尺寸太大!' + fileSize + " >> " + newImgSize)
36-
reject(`图片尺寸太大!`)
3736
}
3837

3938
let blob = this.dataURLtoBlob(newImgData, fileType)
@@ -70,8 +69,6 @@ export default class ImageCompress {
7069
}
7170

7271
fileSizeKB(dataURL) {
73-
let self = this
74-
7572
let sizeKB = 0
7673
sizeKB = Math.round((dataURL.split(',')[1].length * 3 / 4) / 1024)
7774
return sizeKB
@@ -81,8 +78,6 @@ export default class ImageCompress {
8178
* 转为Blob
8279
* */
8380
dataURLtoBlob(dataURL, fileType) {
84-
let self = this
85-
8681
let byteString = atob(dataURL.split(',')[1])
8782
let mimeString = dataURL.split(',')[0].split(':')[1].split(';')[0]
8883
let ab = new ArrayBuffer(byteString.length)

0 commit comments

Comments
 (0)