feat(tool): qr-code generator

This commit is contained in:
Corentin Thomasset
2022-04-14 18:18:15 +02:00
parent 203b6a9d73
commit 5582d75927
8 changed files with 527 additions and 21 deletions
+12
View File
@@ -0,0 +1,12 @@
import type { Ref } from 'vue';
export function useDownloadFileFromBase64({ source, filename = 'file' }: { source: Ref<string>; filename?: string }) {
return {
download() {
const a = document.createElement('a');
a.href = source.value;
a.download = filename;
a.click();
},
};
}