|
@@ -494,12 +494,14 @@ var app = new Vue({
|
|
|
});
|
|
});
|
|
|
var url = canvas.toBlob(function (e) {
|
|
var url = canvas.toBlob(function (e) {
|
|
|
console.log(e); //生成Blob的图片格式
|
|
console.log(e); //生成Blob的图片格式
|
|
|
- var timestamp = Date.parse(new Date());
|
|
|
|
|
- e.name = timestamp + ".png";
|
|
|
|
|
- url = URL.createObjectURL(e);
|
|
|
|
|
- _this.picList[id].url = url;
|
|
|
|
|
- _this.picList[id].preview = url;
|
|
|
|
|
- _this.cropParams.preview = url;
|
|
|
|
|
|
|
+ if(e != null){
|
|
|
|
|
+ var timestamp = Date.parse(new Date());
|
|
|
|
|
+ e.name = timestamp + ".png";
|
|
|
|
|
+ url = URL.createObjectURL(e);
|
|
|
|
|
+ _this.picList[id].url = url;
|
|
|
|
|
+ _this.picList[id].preview = url;
|
|
|
|
|
+ _this.cropParams.preview = url;
|
|
|
|
|
+ }
|
|
|
}, "image/jpeg");
|
|
}, "image/jpeg");
|
|
|
/* _this.picList[id].preview = canvas.toDataURL("image/jpeg", 1);
|
|
/* _this.picList[id].preview = canvas.toDataURL("image/jpeg", 1);
|
|
|
_this.cropParams.preview = canvas.toDataURL("image/jpeg", 1);*/
|
|
_this.cropParams.preview = canvas.toDataURL("image/jpeg", 1);*/
|