save json
This commit is contained in:
@@ -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("导出成功");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user