mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
@@ -110,6 +110,7 @@
|
|||||||
import { core } from "@tauri-apps/api";
|
import { core } from "@tauri-apps/api";
|
||||||
import { open } from "@tauri-apps/plugin-dialog";
|
import { open } from "@tauri-apps/plugin-dialog";
|
||||||
import { remove } from "@tauri-apps/plugin-fs";
|
import { remove } from "@tauri-apps/plugin-fs";
|
||||||
|
import { exit } from "@tauri-apps/plugin-process";
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
|
|
||||||
import TcAppBadge from "../../components/config/tc-appBadge.vue";
|
import TcAppBadge from "../../components/config/tc-appBadge.vue";
|
||||||
@@ -369,10 +370,11 @@ async function confirmDelCache(): Promise<void> {
|
|||||||
}
|
}
|
||||||
await TGLogger.Info("[Config][confirmDelCache] 缓存清除完成");
|
await TGLogger.Info("[Config][confirmDelCache] 缓存清除完成");
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
showSnackbar({ text: "缓存已清除!即将重启应用!" });
|
showSnackbar({
|
||||||
|
text: "缓存已清除!即将退出应用!",
|
||||||
|
});
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
const { relaunch } = window.__TAURI_PLUGIN_PROCESS__;
|
await exit();
|
||||||
await relaunch();
|
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user