shaogen1995 2 years ago
parent
commit
fa193951dd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/pages/H5Code/index.tsx

+ 1 - 1
src/pages/H5Code/index.tsx

@@ -88,7 +88,7 @@ function H5Code() {
         let blob: any = dataURLToBlob(dom.toDataURL("image/png"));
         let blob: any = dataURLToBlob(dom.toDataURL("image/png"));
         a.setAttribute("href", URL.createObjectURL(blob));
         a.setAttribute("href", URL.createObjectURL(blob));
         //这块是保存图片操作  可以设置保存的图片的信息
         //这块是保存图片操作  可以设置保存的图片的信息
-        a.setAttribute("download", info.name + ".jpg");
+        a.setAttribute("download", info.name + ".png");
         document.body.appendChild(a);
         document.body.appendChild(a);
         a.click();
         a.click();
         URL.revokeObjectURL(blob);
         URL.revokeObjectURL(blob);