feat(tool): qr-code generator

This commit is contained in:
Corentin Thomasset 2022-04-14 18:18:15 +02:00
parent 203b6a9d73
commit 5582d75927
No known key found for this signature in database
GPG key ID: 3103EB5E79496F9C
8 changed files with 527 additions and 21 deletions

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();
},
};
}