|
@@ -23,7 +23,6 @@ export default {
|
|
computed: {},
|
|
computed: {},
|
|
methods: {
|
|
methods: {
|
|
md() {
|
|
md() {
|
|
- console.log("---");
|
|
|
|
// this.download({
|
|
// this.download({
|
|
// savePath: this.url,
|
|
// savePath: this.url,
|
|
// });
|
|
// });
|
|
@@ -32,8 +31,7 @@ export default {
|
|
downimg(url) {
|
|
downimg(url) {
|
|
let img = new Image();
|
|
let img = new Image();
|
|
img.src = url;
|
|
img.src = url;
|
|
- img.onload = function (ev) {
|
|
|
|
- console.log(ev)
|
|
|
|
|
|
+ img.onload = function () {
|
|
|
|
|
|
// 组装a标签
|
|
// 组装a标签
|
|
// let elink = document.createElement("a");
|
|
// let elink = document.createElement("a");
|
|
@@ -56,12 +54,10 @@ export default {
|
|
else xhttp = new window.ActiveXObject("Microsoft.XMLHTTP");
|
|
else xhttp = new window.ActiveXObject("Microsoft.XMLHTTP");
|
|
xhttp.responseType = "blob";
|
|
xhttp.responseType = "blob";
|
|
xhttp.open("GET", row.savePath, true);
|
|
xhttp.open("GET", row.savePath, true);
|
|
- console.log(xhttp);
|
|
|
|
xhttp.send();
|
|
xhttp.send();
|
|
xhttp.addEventListener(
|
|
xhttp.addEventListener(
|
|
"progress",
|
|
"progress",
|
|
res => {
|
|
res => {
|
|
- console.log(res, (res.loaded / res.total) * 100);
|
|
|
|
that.load[row.savePath] =
|
|
that.load[row.savePath] =
|
|
((res.loaded / res.total) * 100).toFixed(0) - 0;
|
|
((res.loaded / res.total) * 100).toFixed(0) - 0;
|
|
},
|
|
},
|