This commit is contained in:
grey-cat-1908 2024-03-25 10:17:19 +03:00
parent 5e06fdb122
commit 8b3b5653b0
2 changed files with 4 additions and 1 deletions

View file

@ -12,6 +12,7 @@
"@mdi/font": "^7.4.47", "@mdi/font": "^7.4.47",
"@svgdotjs/svg.js": "^3.2.0", "@svgdotjs/svg.js": "^3.2.0",
"@vueuse/core": "^10.9.0", "@vueuse/core": "^10.9.0",
"flatted": "^3.3.1",
"pinia": "^2.1.7", "pinia": "^2.1.7",
"vue": "^3.3.11", "vue": "^3.3.11",
"vue-i18n": "^9.10.2", "vue-i18n": "^9.10.2",

View file

@ -11,6 +11,8 @@ import {ExtraBranch} from "./models/map/extraBranch.ts";
import {useEventListener} from '@vueuse/core' import {useEventListener} from '@vueuse/core'
import {Settings} from "./models/settings.ts"; import {Settings} from "./models/settings.ts";
import {stringify} from 'flatted';
const element = ref<HTMLDivElement>() const element = ref<HTMLDivElement>()
const xcord = ref(0); const xcord = ref(0);
@ -100,7 +102,7 @@ function setFile(event) {
} }
function save () { function save () {
let text = JSON.stringify(store); let text = stringify(store);
let filename = 'metroMap.json'; let filename = 'metroMap.json';
let element = document.createElement('a'); let element = document.createElement('a');
element.setAttribute('href', 'data:application/json;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('href', 'data:application/json;charset=utf-8,' + encodeURIComponent(text));