PASSAGGIO A VITE !

AGG. 1.1.23
This commit is contained in:
Surya Paolo
2025-03-01 14:14:43 +01:00
parent f0098e57b2
commit bc960d38a1
1044 changed files with 5323 additions and 10823777 deletions

View File

@@ -1,6 +1,6 @@
import { tools } from '../../store/Modules/tools'
import { useQuasar } from 'quasar'
import { useI18n } from '@src/boot/i18n'
import { useI18n } from 'vue-i18n'
import { useUserStore } from '@store/UserStore'
import { useGlobalStore } from '@store/globalStore'
import { defineComponent } from 'vue'
@@ -31,17 +31,17 @@ export default defineComponent({
// Crea un blob dalla jsonString passata come proprietà
const blob = new Blob([props.testoJson], { type: 'application/json' });
const url = URL.createObjectURL(blob);
// Crea un link temporaneo
const link = document.createElement('a');
link.href = url;
const fileName = `${props.nomefile}-${tools.getDateYYYYMMDD_Today()}.json`;
link.download = fileName; // Nome del file da scaricare
// Aggiungi il link al DOM e clicca per scaricare
document.body.appendChild(link);
link.click();
// Rimuovi il link dal DOM e libera l'oggetto URL
document.body.removeChild(link);
URL.revokeObjectURL(url);