shaogen1995 2 năm trước cách đây
mục cha
commit
fa193951dd
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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"));
         a.setAttribute("href", URL.createObjectURL(blob));
         //这块是保存图片操作  可以设置保存的图片的信息
-        a.setAttribute("download", info.name + ".jpg");
+        a.setAttribute("download", info.name + ".png");
         document.body.appendChild(a);
         a.click();
         URL.revokeObjectURL(blob);