From 3f73a5a521c1a0d5c9f4c345bac4c6169bb00960 Mon Sep 17 00:00:00 2001 From: spark Date: Mon, 10 Feb 2025 09:47:10 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=E6=B7=BB=E5=8A=A0=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=AF=BC=E5=87=BA=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 App.d.ts 中添加 ExportConfig 函数声明 - 在 app.go 中实现 ExportConfig 方法,用于导出配置文件 - 在 App.js 中添加 ExportConfig 函数的 JavaScript 调用接口 - 在 settings.vue 中添加导出和导入配置的功能按钮,并实现相关逻辑 - 在 settings_api.go 中添加 Export 方法,用于生成配置文件的 JSON 字符串 --- app.go | 1 + 1 file changed, 1 insertion(+) diff --git a/app.go b/app.go index 93505bc..69447f9 100644 --- a/app.go +++ b/app.go @@ -535,6 +535,7 @@ func (a *App) ExportConfig() string { file, err := runtime.SaveFileDialog(a.ctx, runtime.SaveDialogOptions{ Title: "导出配置文件", CanCreateDirectories: true, + DefaultFilename: "config.json", }) if err != nil { logger.SugaredLogger.Errorf("导出配置文件失败:%s", err.Error())