提交 16402e79 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

修复warning 前端启动自动打开文档

上级 5b51b894
......@@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"serve": "start https://www.gin-vue-admin.com && vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
......
......@@ -61,9 +61,9 @@ export default {
}
return isRightSize;
},
handleImageSuccess(res, file) {
handleImageSuccess(res) {
// this.imageUrl = URL.createObjectURL(file.raw);
const { code, msg, data } = res;
const { data } = res;
if (data.file) {
this.$emit("change", data.file.url);
}
......
......@@ -33,7 +33,6 @@ export default class ImageCompress {
if (newImgSize > this.fileSize) {
console.log('图片尺寸太大!' + fileSize + " >> " + newImgSize)
reject(`图片尺寸太大!`)
}
let blob = this.dataURLtoBlob(newImgData, fileType)
......@@ -70,8 +69,6 @@ export default class ImageCompress {
}
fileSizeKB(dataURL) {
let self = this
let sizeKB = 0
sizeKB = Math.round((dataURL.split(',')[1].length * 3 / 4) / 1024)
return sizeKB
......@@ -81,8 +78,6 @@ export default class ImageCompress {
* 转为Blob
* */
dataURLtoBlob(dataURL, fileType) {
let self = this
let byteString = atob(dataURL.split(',')[1])
let mimeString = dataURL.split(',')[0].split(':')[1].split(';')[0]
let ab = new ArrayBuffer(byteString.length)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册