shaogen1995 2 年之前
父節點
當前提交
fa193951dd
共有 1 個文件被更改,包括 1 次插入1 次删除
  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);