save json

This commit is contained in:
Julian Freeman
2026-03-22 19:32:49 -04:00
parent facce53aba
commit f0112ffcd4
3 changed files with 8 additions and 3 deletions

View File

@@ -2,7 +2,6 @@
import { ref, onMounted, onUnmounted, computed, nextTick } from "vue";
import { load } from "@tauri-apps/plugin-store";
import { open, save } from "@tauri-apps/plugin-dialog";
import { writeTextFile } from "@tauri-apps/plugin-fs";
import { invoke } from "@tauri-apps/api/core";
import { listen } from "@tauri-apps/api/event";
import { Tag as TagIcon, FolderOpen, Settings, Play, Pause, Maximize2, X, RefreshCw, Plus, Trash2, ChevronDown, ChevronLeft, ChevronRight, Calendar, Download } from "lucide-vue-next";
@@ -380,7 +379,7 @@ const handleExport = async () => {
content: e.content
}));
await writeTextFile(savePath, JSON.stringify(exportData, null, 2));
await invoke("write_file", { path: savePath, content: JSON.stringify(exportData, null, 2) });
isExportModalOpen.value = false;
showToast("导出成功");
}