eligrey / FileSaver.js

An HTML5 saveAs() FileSaver implementation
https://eligrey.com/blog/saving-generated-files-on-the-client-side/
Other
21.42k stars 4.38k forks source link

download canvas file in client side not working #723

Open Sinosaurus opened 2 years ago

Sinosaurus commented 2 years ago

nuxt + html2canvas + fileSaver

html2canvas(this.$refs.content, {
  useCORS: true
}).then(canvas => {
  const fileName = `${this.detail.company_name}.jpg`;
  canvas.toBlob(blob => {
    saveAs(blob, fileName);
  });
});

mobile browser

browser is working
chrome ok
kuake not
default not
huawei not