diff --git a/src/pages/common/Config.vue b/src/pages/common/Config.vue index 1395c54d..6cbf77bc 100644 --- a/src/pages/common/Config.vue +++ b/src/pages/common/Config.vue @@ -110,6 +110,7 @@ import { core } from "@tauri-apps/api"; import { open } from "@tauri-apps/plugin-dialog"; import { remove } from "@tauri-apps/plugin-fs"; +import { exit } from "@tauri-apps/plugin-process"; import { onMounted, ref } from "vue"; import TcAppBadge from "../../components/config/tc-appBadge.vue"; @@ -369,10 +370,11 @@ async function confirmDelCache(): Promise { } await TGLogger.Info("[Config][confirmDelCache] 缓存清除完成"); loading.value = false; - showSnackbar({ text: "缓存已清除!即将重启应用!" }); + showSnackbar({ + text: "缓存已清除!即将退出应用!", + }); setTimeout(async () => { - const { relaunch } = window.__TAURI_PLUGIN_PROCESS__; - await relaunch(); + await exit(); }, 1000); }